fixed some minor typos with js examples

closed some parens and added a missing comma :)