Apple posted JavaScript for Automation release Notes (preview) on its official website, causing widespread community concern, and the general consensus was that it was an experimental attempt to replace/complement AppleScript.
The predecessor of AppleScript is the scripting language HyperTalk used by HyperCard. Apple discovered that HyperTalk's English-like syntax could be used to manipulate other software, and developed AppleScript as part of System 7. AppleScript also transitions from Apple's classic operating system to Mac OS X and Cocoa architectures. Apple also launches AppleScript Studio with Mac OS X 10.2, which makes cocoa software with an image interface complete with AppleScript. Note: Excerpt from wiki
JavaScript, with its simple syntax, good performance, super lightweight frame, minimal coupling of modular systems and so on, has attracted the attention of many manufacturers.
Coupled with the inherent openness of JavaScript and the patent-free dispute, a very broad group of developers (open source), Apple introduced it to the OS X platform instead of private AppleScript, and may also have some open platform to consider, thus attracting a wide range of third-party developers.