Update example.js

example simplification.