NodeJs Tutorial - 03 (Hello world)


How to start coding in NodeJs?
Create a folder “NodeJS-Tutorial” (any name) in your PC
Open VS code in your window
In VS code now click on File —>Open Folder Now select your folder and Open
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.
Subscribe to my newsletter
Read articles from Ashish Singh directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
