fixed some typos with example js code