Hello world in node.js


Overview

Let's follow the ritual of programming and start by creating a program which will print hello world on the console as output. Code is given below:

Code


													
//file-name : hello-world.js
console.log('hello world');				
													
												

Run

  • Now run the snippet using the following command :
    													
    >node hello-world.js
    hello world