Joe Slater Joe Slater - 1 year ago 37
Javascript Question

How to execute a hello world javascript file in node.js

I have

file located on my computer at the following location -


It has the following code-

console.log("Hellow World");

I was reading a beginners tutorial here and it says I should execute my javascript file through node.js. Now I have no idea what to do. How would I do this.

When I do this ...
enter image description here

I get nothing.
What should I be doing to run the hello world successfully. None of the tutorials seem to be showing what needs to be done.

I am very new to this so it is probably something that is very obvious to you guys.


Use Node.js command prompt, then type in node C:\Users\Ankur\Downloads\NodeJS\working\hello_world.js