Fix JS example, fixes #1

There you have it :jack_o_lantern: