JScript (Microsoft's JavaScript dialect) can be used as a general purpose scripting language (in purpose similar to shell scripts or maybe VBA, but using JavaScript and ActiveX). And until you install your first code editor to map the file extension to, the default action on double click is to execute the script.
Or at least that used to be the case, not sure if this is still a thing in Windows 10/11.
Active Scripting, including JScript, still ships out of the box in Win11. The file extension association is also there, but I don't recall if it's active by default, or you get the "how would you like to open?" dialog first.
This is the default behaviour in Windows. It runs in the Windows Script Host as JScript (Microsoft's version of ECMAScript) and has access to basically anything Win32 the current user has, the same as macros in Office
Yeah probably. I was a little surprised myself, but it is my dev machine so not that surprised