Add Javascript examples

Closes #8.
(cherry picked from commit f5366da)