Q:

Can Windows Script Host run a .js file

For a course project, I need to open a javascript file, namely script.js, to edit it to make index.html work.
But every time I click it, a message that says, 'Do you want to open this file?' comes up.After I click open, An error message  comes ands says windows script host can't open this file. I can't post what it says for privacy's sake.
I've gone to multiple sites for answers.Since it is a windows, I went to Microsoft, but they said it is more of a programmers problem and  that I should check out websites like stackoverflow.com.
Before then I had restarted the computer, and I also tried downloading from Chrome and Firefox.But still can't get it resolved. I need the file to open to complete the project.
This is also a new computer. I also tried opening on older computer,but it still didn't open.
How I got the file:
I downloaded the link from the course website on 1/1/2020
Then it went to File explorer.
If you click index.html (it opens with internet explorer) ,README.md (opens in wordpad),and style.css(opens with notepad).
It's the code(script.js) that makes 'index.html' work that won't open.
It's all inside a folder that ends in .zip
I'm new to javascript, so I really don't understand what's going on.
Is there something about the script that is corrupted? Or is it outdated? Can windows even run a javascript file? I'm almost thinking that is the problem.
I checked this link: https://www.youtube.com/watch?v=vOFuUNpLCQE , but I found I don't have 'enabled'
I really need help because I have a deadline on 29 February 2020.
Can you switch from windows to another type on the same computer?

A:

Presumably, the goal is to edit the JavaScript file.

Open your prefered editor. e.g. Visual Studio Code, Sublime Text, Atom or Brackets.
Pick "Open" from the "File" menu
Pick your JS file from the dialog

At some point you may wish to configure your file manager (e.g. Windows Explorer or macOS Finder) to open JS files in your editor of choice by default.

To run a JS file will depend on what environment it is designed to run in. e.g. JS embedded in a web page is run by linking to it with a <script> element in an HTML document and then opening that document in a web browser, while a command line program designed for use with Node.js is generally run with node XXXXXXX.js on the command line or via npm and a package.json configuration. Photoshop plugins are different. Server-side JS in classic ASP is different again. And so on.

