Update javascript example

Signed-off-by: Tim Smart <tim@fostle.com>