Node.js skill check
Practise Node.js: the event loop, modules, streams, Express, error handling, and scaling with workers.
15
Questions
11 min
Timer can't pause
Multiple choice
Node.js 22
Choose a level
Topics
- Event loop
- Modules
- Streams
- File system
- Express
- Error handling
- Child processes and workers
- Performance
Do
Use scratch paper or a notepad to work things out. Skip a question and come back to it later.
Don't
Look up answers during the check. Open the check in more than one tab or window.
Easy · 15 questions · 11 min
By starting, you agree to the Terms and Privacy Policy.
Practice checks each answer as you go, with an explanation. The exam is checked when you submit; 9 of 15 passes and earns a certificate.
Checking your levels…
Certificates come from the certified exam: pass with 9 of 15 while signed in. View a sample certificate.
Sample Node.js questions with answers
These are never used in a check, so seeing their answers here won't give anything away.
Question 1 · Easy · Event loop
Which phase of the Node.js event loop executes callbacks scheduled bysetImmediate()?- A.Poll phase
- B.Check phase
- C.Timers phase
- D.Close callbacks phase
Show answer
B. Check phase
The check phase is dedicated to running callbacks scheduled by setImmediate(). Poll handles I/O events, and timers handles setTimeout and setInterval.Question 2 · Easy · Modules
In an ECMAScript module (.mjs ortype: "module"), which CommonJS variable is NOT available in the global scope?- A.console
- B.Buffer
- C.__dirname
- D.process
Show answer
C. __dirname
CommonJS variables like __dirname, __filename, require, and module are not defined in ES modules. Developers typically use import.meta.url with path tools instead.Question 3 · Moderate · File system
A Node.js HTTP server receives concurrent requests to read configuration files. Why isfs.promises.readFile()preferred overfs.readFileSync()in this server environment?- A.fs.readFileSync crashes the process immediately if the requested file exceeds 64 KB
- B.fs.readFileSync uses more disk space during read buffers than fs.promises.readFile
- C.fs.readFileSync executes synchronously on the main thread, blocking the event loop from handling other incoming network requests
- D.fs.promises.readFile bypasses the operating system page cache to yield higher sustained throughput
Show answer
C. fs.readFileSync executes synchronously on the main thread, blocking the event loop from handling other incoming network requests
Synchronous file system operations block the single JavaScript event loop thread until the entire disk I/O completes, preventing the server from accepting or processing any other incoming requests during that time.Question 4 · Advanced · Streams
Why isstream.pipeline()preferred overreadable.pipe(writable)in production Node.js applications?- A.pipeline converts all stream chunks to ArrayBuffers to reduce V8 garbage collection overhead.
- B.pipeline automatically executes each stream stage in a separate worker thread.
- C.readable.pipe does not properly forward errors and can leave file descriptors or sockets open upon failure.
- D.readable.pipe buffers chunks indefinitely if the destination writable stream emits a backpressure signal.
Show answer
C. readable.pipe does not properly forward errors and can leave file descriptors or sockets open upon failure.
The legacy .pipe() method does not destroy streams or close underlying resources when an error occurs in the middle of a pipeline. stream.pipeline ensures all streams are properly closed and destroyed upon errors or completion.
How scoring and certificates work
- Each check has 15 multiple-choice questions with one correct answer, and one timer for the whole check. A question you leave unanswered scores nothing.
- Practice is free without an account and shows whether each answer is right as you go, with an explanation.
- The certified exam is scored when you submit. 60% passes, which is 9 of 15. Easy unlocks Moderate, and Moderate unlocks Advanced.
- Passing the exam while signed in earns a free certificate, valid for one year, with its own verification page. See a sample certificate.
Free tools for Node.js: JavaScript Formatter, JSON Formatter, JWT Decoder