Updated JS example.