Fix JS example, fixes #1
Merge pull request #2 from paazmaya/master

Fix JS example, fixes #1