Step 1: Download & Install Node.js
1) Firstly we’ll have to download the latest version of Nodejs available on the internet. Follow the below-provided download link and you’ll be redirected to the official Nodejs downloads page. Now based on your system architecture click on the appropriate button and your download will start. In our case, it’s “64 bit“.
Download Node.js Here: https://nodejs.org/en/download/
2) After the downloads get finished open it in the folder where it has been downloaded and simply double click on the downloaded file to start the Nodejs installation wizard.
3) A setup wizard will appear in the window screen, so here click next.
4) Now you’ll be asked to accept the license agreement, so simple tick the “I accept the terms in the license agreement” box and click next.
5) The installation wizard will now ask you to select the installation path for Nodejs. Here we will go with the default installation path so simply click next.
6) A custom setup window will appear so here as well no need to change anything simply click next.
7) A Ready To Install Nodejs window will appear so simply click on the install button and Nodejs will start getting installed in your system.
8) Once installation gets complete click on the finish button. By this time Nodejs is successfully installed in your system. So if you see something similar to the below image then congrats 👍👍 you’ve nailed the installation process.
Step 2: Verify Node.js & Npm Version
1) Open your command prompt by searching “cmd” and pressing enter in the windows search menu.
2) In the command prompt type
to check the installed version of Nodejs.
3) Now type
to check the installed version of the node package manager.
2) Now again search for “code runner” and select the first option provided by Jun Han and install it in the same way described above.
3) Create a New File in vs code by simply clicking “Ctrl+N“.
4) Save this newly created file by the name “subscribe.js“.