Fix JS example code to be the same as in its description.