The first thing you’ll need is Node.js; specifically, we need the NPM package manager, which comes bundled with it. You can visit nodejs.org and download it there.
Visual Studio Code
If you don’t already have it, the next thing you will need is Visual Studio Code itself. You can download Visual Studio Code from code.visualstudio.com.
Now that we have all the tools installed, let’s create our first project. Traditionally, we will learn to print out the words “Hello World.”
Step 1: Create a new file
- Click on New File from the “File” section. You’ll see a new tab in the code editor.
- Click on Save As from the “File” section.
- Choose your preferred directory where you want to save the file. Then, type the file name followed by .js at the end of the file name.
The syntax is simple; write node followed by the file’s name. It will run “Hello world.”