Add a JavaScript version of the sample
Fix small typo in JS example in readme
Merge pull request #2 from ForbesLindesay/patch-1

Add a JavaScript version of the sample in the README