I watched a video on YouTube and the creator created a simple JavaScript project. After that he just ran it in the terminal of VS Code.
I searched about this on YouTube and Google but I can't understand it.
How do I run my JavaScript project using the terminal in VS Code?
You should get help from Node.js ecosystem!
Install Node.js LTS version from official website! (node.js website)
Install live-server package(live-server website) globally
Go to the directory where the project is.
~ cd path/to/project
Then just run
~ live-server
You can use nodejs, but you can't use some javascript keywords and methods which run on the browser like document addEventListener (but we have on method). Because node is built for server-side applications, there is no document on the server.
If you are working on a frontend application, there are many packages you can use, like
npm install -g serve)npm install -g live-server)