NODEJS “HELLO WORLD” CODE TO RUN ON THE COMMAND LINE.
var msg = 'Hello World!'; console.log(msg);
Msg is the parameter that is passed to the log method.
Now you can run the above code by running this line on the command line of a terminal or command prompt. (In case you are running on the command line).
node app.jsTHE FOLLOWING RESULT
It is not necessary to specify the file extension because it’s not mandatory.
AFTER THAT YOU WILL GET :
Hello World !”