PGoCareerGoCareer prep tools
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

Node.js · Theory

Install on Linux

← All stacks

Theory

3/723

Install on Linux

Node.js runs JavaScript on the server (and in scripts), not only in the browser. Chrome’s V8 engine + an event loop. You write hello.js, run node hello.js, and it prints. No Apache required for a tiny API.

It is not a new language. It is JavaScript plus modules like fs, http, path. npm installs extra packages. Good for APIs, tooling, realtime chat. CPU-heavy number crunching can block the event loop — offload it.

Trap: ‘Node is a language’. Trap: ‘Node replaces the browser’. The browser still runs JS for pages. Node runs JS on the machine.

Diagram
hello.js
     │ node
     ▼
   V8 + event loop
     │
     ▼
  console / HTTP
Exam tip

JS on the server. node hello.js. Not a new language.

Example

// Install on Linux
const users = [
  { id: 1, name: "Asha" },
  { id: 2, name: "Ravi" },
];

function findUser(id) {
  return users.find((u) => u.id === id) ?? null;
}

console.log(findUser(2));
console.log(users.map((u) => u.name));

Install on Linux: find user 2, then list names. Say both prints.

Short notes

  • DefJavaScript on the server. node file.js
  • RuleV8 + event loop + npm.
  • TrapCalling Node a language. Blocking the event loop.

Questions

1

What is Node.js?

2

Why event loop?

3 / 723

P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.