What does `module.exports` vs `exports` mean when you write only `exports = { ready: true }` in a module?
// flags.js
exports = { ready: true };
// app.js
console.log(require('./flags'));Read the full question →Every question is hand-checked, every answer comes with an explanation, and your progress builds into a clear picture of where you stand.
Every NodeJS question shows its code before you answer, so you are reading real NodeJS, not a description of it.
Once you attempt a question you get the reasoning, not just a tick. That matters most on NodeJS, where event-loop phases, the difference between setimmediate and process.
Progress is tracked per topic across the 48 NodeJS topics, so revision points at the gaps instead of the whole list.
519 NodeJS questions right now: 103 easy, 216 medium and 200 hard. That number is read straight from the question table when this page is built, so it is never a rounded marketing figure.
No. Every NodeJS question, including its code snippet, its difficulty and its topic, is readable without signing in. You need a free account only to submit an answer, see which option is correct, and read the worked explanation. We keep it that way so the platform stays honest about what you actually got right.
Event-loop phases, the difference between setImmediate and process.nextTick, backpressure on streams, cluster and worker threads, and how to avoid blocking the loop.
48 distinct topics are tagged on the NodeJS questions, including Worker threads basics, V8 garbage collection, child_process spawning, streams backpressure internals, event loop phases, memory leak debugging. The topic labels come from the questions themselves, so the list matches what you will actually be asked.
Yes. Reading is free and unlimited. A free account unlocks answering, explanations and progress tracking. Pro (₹199 per month) adds AI explanations and AI-graded guesstimates on top; it is not needed to practise NodeJS MCQs.
API services, BFF layers, build tooling, and serverless functions across most JavaScript-first companies.
These are 12 of the 519 NodeJS questions in the library, pulled live from the question table. The snippet, the difficulty and the topic are all here. The answer options and the explanation are not. Those need a free account.
Event-loop phases, the difference between setImmediate and process.nextTick, backpressure on streams, cluster and worker threads, and how to avoid blocking the loop.
// flags.js
exports = { ready: true };
// app.js
console.log(require('./flags'));Read the full question →Promise.resolve().then(() => {
console.log('then');
process.nextTick(() => console.log('nextTick'));
queueMicrotask(() => console.log('microtask'));
Promise.resolve().then(() => console.log('inner then'));
});Read the full question →// index.js (no "type": "module")
import os from 'os';
console.log(42);Read the full question →const server = http.createServer((req, res) => {
res.writeHead(200, { 'Content-Type': 'text/plain' });
res.setHeader('X-Powered-By', 'Node');
res.end('ok');
});Read the full question →for (const url of urls) {
const res = await fetch(url);
console.log(res.status);
}Read the full question →console.log(process.env.DEBUG);Read the full question →const fs = require('fs');
try {
fs.readFile('nope.txt', (err, data) => {
if (err) throw err;
console.log(data);
});
} catch (e) {
console.log('caught:', e.message);
}Read the full question →async function run() {
const r = await [Promise.resolve(1), Promise.resolve(2)][0];
console.log(r);
}
run();Read the full question →exports = { a: 1 };
module.exports.b = 2;Read the full question →const fs = require('fs');
fs.readFile(__filename, 'utf8', (err) => {
if (err) throw err;
console.log('done');
console.log(data);
});Read the full question →const { isMainThread } = require('worker_threads');
console.log(isMainThread);
// run as: node app.jsRead the full question →const fs = require('fs');
fs.readFile('config.json', 'utf8', (err, data) => {
console.log(data.length);
if (err) console.log(err);
});Read the full question →We keep the correct answer, the explanation and the scoring behind sign-in so the platform stays honest, which is why the correct option and the worked explanation for every NodeJS question stay behind a free account. Signing in is free and takes a few seconds.
API services, BFF layers, build tooling, and serverless functions across most JavaScript-first companies.