Add a JavaScript example for online viewing.