Apple has not updated their scripting documentation for JavaScript. The most recent documentation appears in the [OS X 10.11 Release Notes - JavaScript for Automation](https://developer.apple.com/library/mac/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/OSX10-11.html#//apple_ref/doc/uid/TP40014508-CH110-SW1). There is extensive documentation for AppleScript in the [AppleScript Language Guide](https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/introduction/ASLR_intro.html#//apple_ref/doc/uid/TP40000983). MacStories has published a tutorial [Getting Started with JavaScript for Automation on Yosemite](https://www.macstories.net/tutorials/getting-started-with-javascript-for-automation-on-yosemite/). Both this tutorial and Ash Ryan's [Script Editor on Mac now lets you use JavaScript for automation](http://ashryanbeats.com/script-editor-on-mac-now-lets-you-use-javascript-for-automation/) mention a [WWDC 2014: “JavaScript for Automation”](https://developer.apple.com/videos/play/wwdc2014/306/) which is probably the best place to learn more.