JavaScript version used by the Windows Scripting Host
Its a common mistake to make but the Windows Scripting Host supports VBScript and Microsofts own JavaScript implementation called JScript based on the ECMAScript standard. In fact, it can support a number of scripting implementations through its support for Active Scripting languages.
While it shares many similarities with JavaScript, they are not the same (yes, they came from the same place, but that doesn't mean they didn't diverge afterwards). When you use .js files outside of Internet Browser (the only browser to support Active Scripting was early versions of IE, pre Edge) they are executed using a host program, in this case the Windows Scripting Host. This also applies when using .wsf files.
Edit: I've also updated the wsh tag info as it states javascript can be used, which is incorrect and why so much confusion arises around this topic.
Useful Links
- Answer to What will be the status of the term JScript in MSDN?
- JScript Language reference (via archive.org before Microsoft nuked it)
- Answer by @dai (who was an engineer on the Microsoft JavaScript Team) regarding JScript versions