correcting typo in JS example in docs