How to run your first NodeJS code in VS Code (Hello World)
This tutorial will show you how to run your first NodeJS code in VS Code.
Node.js installed on your computer (you can download the setup file from the official website nodejs.org and just click “Next, next, next…” ).
1. Open your VS Code, create a brand new js file and call this whatever you like. I will call it something like “hello.js”.
2. Add some code to say “Hello world!”:
3. Create a new terminal by pressing “Ctrl + `” or selecting “Terminal > New Terminal” from the main menu. After that, type “node hello.js” if you are using Windows or “sudo node hello.js” if you are using Mac and see the result: