How to activate and run JavaScript in AppleScript?
You cannot. JavaScript for Automation was only introduced in OS X 10.10 Yosemite.

AppleScript Editor.app was also renamed to Script Editor.app due to it now not only being for AppleScript.