NodeJs Tutorial - 03 (Hello world)

Ashish SinghAshish Singh
1 min read

How to start coding in NodeJs?

  1. Create a folder “NodeJS-Tutorial” (any name) in your PC

  2. Open VS code in your window

  3. In VS code now click on File —>Open Folder Now select your folder and Open

    1. Now create new file with name index.js or any name with .js extension

      Now we have index file in this file we can write any valid js code and it will run, now after writing code in index.js file let’s write hello world

        console.log("Hello, World!")
      

      Now Open Terminal by clicking on View and last second is Terminal click on that or shortcut is press “ ctrl + ` “ then it will open the terminal in terminal to run our js code we write node fileName.js in our case node index.js and now you can see the output on the terminal screen.

0
Subscribe to my newsletter

Read articles from Ashish Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ashish Singh
Ashish Singh