Skip to main content

Menu

System onlineAI Tutorials / 2026

AI Tutorials
Knowledge search

Recent · Popular · Tutorials

  • dart3 tutorials
  • java1 tutorial
  • Javascript3 tutorials
  • Node.js Introduction2 tutorials
  • dartdart · General · In depth
  • JavascriptJavascript · Advanced · In depth
  • JavascriptJavascript · Advanced · Mid
  • JavascriptJavascript · Advanced · Short

Find a tutorial

Tell the assistant what you want to learn. It suggests published chapters.

For example: “I want to learn Rust ownership from the start.” The conversation is kept only in this tab.

0 / 2,000 characters

Enter to send, Shift+Enter for a new line. Do not include personal information.

Chapter 1

What Is Node.js?

Node.js is a program that lets your computer run JavaScript without a web browser. JavaScript is the language that makes web pages interactive. For a long time, it only worked inside browsers. Node.js took that same language and made it work anywhere on your computer — so you can use it to build too
Level: GeneralLength: Short1 min read

Read at another depth

What Is Node.js?

Node.js is a program that lets your computer run JavaScript without a web browser. JavaScript is the language that makes web pages interactive. For a long time, it only worked inside browsers. Node.js took that same language and made it work anywhere on your computer — so you can use it to build tools, scripts, and even full websites.

Where Node.js Shines

Node.js is good at tasks where the program spends time waiting — for files, for data, or for messages from other computers. Common uses include:

  • Websites and web services that respond to many visitors at once
  • Small tools that automate boring tasks, like renaming files
  • Chat apps and live updates, where data flows constantly

Big names like Netflix and PayPal use it for exactly these reasons.

Installing Node.js

Installing is simple:

  1. Go to the official website, nodejs.org.
  2. Download the version marked "LTS" (Long Term Support — the stable one).
  3. Run the installer and follow the steps.

To check it worked, open your terminal (a text window for typing commands) and type:

Code example in text
node --version

You should see a number like v20.11.0.

Running Your First Script

Create a file called hello.js with one line:

Code example in javascript
console.log('Hello, Node.js!');

Then run it from the terminal:

Code example in text
node hello.js

The message appears in your terminal. You just ran JavaScript outside a browser.

Exploring with the REPL

Node.js also has a playground called the REPL. That stands for Read, Evaluate, Print, Loop — it reads what you type, runs it, prints the result, and waits for more. Type this in your terminal:

Code example in text
node

You get a > prompt. Try typing 2 + 2 and press Enter. Try Math.max(3, 9). Type .exit (or press Ctrl+C twice) to leave.

The REPL is perfect for testing small ideas before writing them into files.

Exercise

What do you type in the terminal to check that Node.js is installed?

Show answer

node --version — it prints the installed version number.

Spotted a mistake, or code that does not work?

Report an issue

Chapter: What Is Node.js?

0 / 2,000 characters

Plain text, for example: the second code sample does not compile. Do not include personal information.

You can't do that