Apple released JavaScript for Automation Release Notes (preview version) on its official website, which attracted widespread attention from the community. The general consensus in discussion is that this is an experimental attempt to replace/supplement AppleScript.
AppleScript's predecessor was Hypertalk, a scripting language used by Hypercard. Apple discovered that Hypertalk is similar to English and can be used to manipulate other software, so it developed AppleScript and became part of System 7. AppleScript has also transitioned from Apple's classic operating system to Mac OS X and Cocoa architecture. Apple also launched AppleScript Studio with Mac OS X 10.2, which can use AppleScript to create Cocoa software with an image interface. Note: Excerpted from Wiki
JavaScript has attracted the attention of many major manufacturers with its advantages of simple syntax, good performance, ultra-lightweight framework, extremely small coupled module system, etc.
Coupled with the innate openness of JavaScript and no copyright patent disputes, it has a very wide developer (open source) community. Apple introduced it to the OS X platform instead of private AppleScript, and may also have some considerations for open platforms, thereby attracting a wide range of third-party developers.