Syntax highlighting for JavaScript

The first handful of snippets have JavaScript syntax highlighting, which helps increase readability. These remaining code snippets looked a bit drab, so I added the syntax highlighting to them as well.

Cheers,
Chris