Quantcast
Viewing all articles
Browse latest Browse all 9

Hello World! In Node.js

As is usual in computer programming, when learning a new language or framework, the initial program is the “Hello World!” application.

In Node.js, the “Hello World!” program is written with a twist to show of the event-driven nature of the platform.

So, without further ado, here’s “Hello World!”, Node.js style.

Add the following code into a file called helloworld.js

setTimeout(function() {
console.log("World !");
}, 1000);

console.log("Hello");

Then run the application with:

>node helloworld.js

Viewing all articles
Browse latest Browse all 9

Trending Articles