Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 659 Bytes

File metadata and controls

27 lines (17 loc) · 659 Bytes

Time to Say Hello, World!

It's time to run JavaScript code using Node.

First, create a new JavaScript file named chapter-01.js from the command prompt:

touch chapter-01.js

Next, add this line of code into the file:

console.log("Hello, World!");

Now let's run the script with Node by running this command:

node chapter-01.js

The console will reply with printing "Hello, World!" into the console.

You've just ran your very first JavaScript code using Node.js. Congratulations!

Granted, this is not the most useful program in the world, but this small piece of code proves that you can run JavaScript perfectly.