I am currently trying to catch up with some JS basics, before continuing with my node.js-project.
I wanted to execute the file and kept getting the error 'console is not defined', when I wanted to use console.log('Hello!')
The only helpful way to run the file normally was with: node ./myjsfile.js
I installed node.js for that node project.
But for just running super basic JavaScript I don't want node.js.
What are better (lighter!) ways to run my JavaScript files inside Visual Studio Code? Like what's the most basic way to do it?
No, if you do not currently have Node, you will not have the 'play button' to run the code. So, if you go to Run in the toolbar at the top, you should see some options to run the file.
I'm pretty sure you can just press F1 and then Run Code