JavaScript version updated; added examples for Node.js and browsers.