Node Js hello world program


Hi friends, in this tutorial, you will learn how to run or execute your first node js hello world program. If you are wondering how to do this, then you have come to the right place. Before getting started with node js, let us discuss node js a little bit.

What is node js and why node js

Node js is open source and provides a server-side environment which means it used javascript on the server side instead of client-side and all the files are declared with .js extension. Node js can handle multiple requests at once and return the responses at the same time but other scripting languages such as PHP can not take multiple requests from the client machines simultaneously.

Also, read, the Node JS HTTP server example

Node js programs can be executed in two ways as given below.

  • By using the command line interface i.e. cmd
  • By using the vs code editor

Steps to run the node js hello world program using the command line interface

Step 1:- download node js from here and install it in your system.

Step 2:- Open the command line interface in your system.

Step 3:- Type node and press ENTER to check whether node js is properly installed in your system in CLI.

Step 4:- you will see the output as shown below

C:\Users\Lenovo>node
Welcome to Node.js v18.16.0.
Type “.help” for more information.
>

if you see the above information then you are confirmed that node js is installed and you can debug or print anything you want with the help of the console class. Note that the javascript console is different from than console provided by the node.
Now, you can run the node js hello world program as shown below

console.log(“Hello World”);
Hello World
undefined

Note that log is a function used with the console class provided by node js. As soon as you write anything inside the log() function and press ENTER, it will print the value inside the log() function. Undefined is shown just to let you know that log() does not return anything.

Also read, How to Import Custom Module in Node JS

Using the vs code editor

  • First of all, download and install the vs code editor.
  • Now, create a file inside the vs code editor with .js extension as shown below
Node Js hello world program
  • Now, open the js file you created and write “Hello World” inside console.log() and save the file using CTRL+S.
  • Now open the terminal inside the vs code editor as shown below
Node Js hello world program
  • In the terminal, type node filename and press ENTER.
  • It will display the output as Hello World as shown below.
Node Js hello world program

Conclusion:- I hope this tutorial will help you to understand the concept. If you have any doubts then please leave a comment below.


Leave a Comment

RATU311

RATU311

THOR311

parlay

CERI188

HOKI311

RATU311

RATU311

judi bola online

Mix Parlay

THOR311

Ceri188

Thor311 Game Online

Thor311 Aplikasi

LINK CERI188

RATU311 NONTON BOLA

RATU311

HOKI311 Link Alternatif

CERI188 Link RTP LIVE

THOR311

THOR311

Thor311 Live Casino

CERI188

akses VIP THOR311

THOR311

link daftar THOR311

THOR311

situs thor311

THOR311 LOGIN

THOR311

THOR311

THOR311

RATU311

RATU311

HOKI311 Link SABUNG AYAM RESMI

HOKI311 Link QRIS EWALLET

RATU311

LINK CERI188

parlay

HOKI311 Link RTP Gacor

THOR311

RATU311

THOR311

THOR311

HOKI311 Link Apk Resmi

RATU311

KUPU178

RATU311

RATU311

RATU311

CERI188

CERI188 Situs Spaceman Terbaik 2026

KUPU178 Link Daftar

CERI188

CERI188

CERI188

CERI188

CERI188

HOKI311

THOR311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

CERI188 Live Casino

HOKI311 Lapak Arena Slot

RATU311 judi bola

CERI188 Live Casino

HOKI311 Link Spaceman Online

RATU311

HOKI311 Link Daftar Resmi

CERI188 Toto SGP Online

KUPU178

KUPU178

KUPU178

KUPU178

HOKI311 TEMBAK IKAN ONLINE

RATU311

CERI188 PANDUAN MAXWIN SLOT ONLINE

RATU311

RATU311

RATU311

KUPU178

HOKI311 Link Login Alternatif

HOKI311 Live Casino Online

HOKI311 Situs Slot Gacor

THOR311

THOR311

situs judi bola

THOR311

Ceri188 Game Online

CERI188

link login CERI188

THOR311

link login CERI188

CERI188

link login CERI188

link login CERI188

link daftar CERI188

THOR311

HOKI311

HOKI311

CERI188

CERI188

CERI188

parlay

THOR311

RATU311

RATU311

HOKI311

HOKI311

parlay

HOKI311

RATU311

THOR311

KUPU178

HOKI311

KUPU178

KUPU178

KUPU178

HOKI311

parlay

slot gacor

kupu178 link alternatif

kupu178 slot

kupu178 daftar

kupu178 login

link daftar kupu178

judi bola

HOKI311

RATU311

link alternatif RATU311

Link daftar RATU311

link login RATU311

RATU311

RATU311

RATU311

RATU311

KUPU178

KUPU178

KUPU178

THOR311

KUPU178

KUPU178

KUPU178

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

RATU311

THOR311

RATU311

KUPU178

KUPU178

HOKI311

THOR311

KUPU178

THOR311

THOR311

slot thailand

judi bola

THOR311

THOR311

KUPU178

THOR311

situs bola

THOR311

slot gacor

slot gacor

yakuza303

slot gacor

unobet77

slot gacor

slot gacor

RATU311

parlay

parlay

slot gacor

mix parlay

judi bola

judi bola

mix parlay

parlay

judi bola

sv388

judi bola

judi bola

judi bola

parlay

THOR311