test javascript code sample in readme