🌍 NodeJS · subject

NodeJS Core Concepts Syllabus

Every chapter and topic of Core Concepts examined in NodeJS — 3 chapters, 9 topics, plus 51 flashcards written against it.

3Chapters
9Topics
0Sub-topics
~7hEst. first pass
13%Of NodeJS
51Flashcards

Core Concepts syllabus — full chapter and topic list

Expand any chapter to see its topics and sub-topics. This is the whole examinable outline for Core Concepts in NodeJS, not a summary of it.

  1. Event-Driven Architecture

    3 topics
    • Event Loop
    • Event Emitters
    • Callbacks
  2. Non-Blocking I/O

    3 topics
    • Asynchronous Programming
    • Promises
    • Async/Await
  3. Modules and Packages

    3 topics
    • CommonJS Modules
    • ES6 Modules
    • npm (Node Package Manager)

Core Concepts flashcards for NodeJS

22 of 51 cards from the Core Concepts deck — real questions with worked answers.

  1. In Node.js, what is the event loop?

    The event loop is the mechanism that lets Node.js perform non-blocking I/O by offloading operations to the system kernel/thread pool and processing their callbacks when they complete, despite JavaScript being single-threaded.

  2. List the six main phases of the Node.js event loop in order.

    1) timers, 2) pending callbacks, 3) idle/prepare (internal), 4) poll, 5) check, 6) close callbacks. It cycles through these repeatedly.

  3. Which event loop phase executes callbacks scheduled by setTimeout() and setInterval()?

    The timers phase.

  4. In which event loop phase are setImmediate() callbacks executed?

    The check phase (which runs immediately after the poll phase).

  5. What happens in the poll phase of the event loop?

    It retrieves new I/O events and executes their callbacks, and will block waiting for new I/O when appropriate (unless timers or setImmediate callbacks are pending).

  6. How does process.nextTick() relate to the event loop phases?

    process.nextTick() callbacks are not part of any phase; the nextTick queue is drained completely after the current operation finishes and before the event loop continues to the next phase (higher priority than Promise microtasks).

  7. What is the ordering priority between process.nextTick callbacks and Promise microtasks?

    After each operation, the process.nextTick queue is processed first, then the Promise microtask queue, before returning to the event loop phases.

  8. Why is Node.js described as single-threaded yet capable of high concurrency?

    JavaScript executes on a single main thread, but I/O is delegated to libuv's thread pool and the OS kernel, so many operations run concurrently in the background while the main thread stays free via non-blocking callbacks.

  9. What library provides the event loop and asynchronous I/O for Node.js?

    libuv, a C library that implements the event loop and a thread pool for asynchronous operations.

  10. In Node.js, what is the EventEmitter class and where does it come from?

    EventEmitter is a class from the built-in 'events' module that lets objects emit named events and register listener functions to handle them (the publish/subscribe pattern).

  11. Which two EventEmitter methods are used to register a listener and to trigger an event?

    on() (or addListener()) registers a listener; emit() synchronously triggers all listeners for a named event.

  12. What is the difference between EventEmitter's on() and once() methods?

    on() registers a listener that fires every time the event is emitted; once() registers a listener that fires only the first time and is then removed.

  13. How do EventEmitter listeners execute relative to emit()—synchronously or asynchronously?

    Listeners are called synchronously and in the order they were registered when emit() is invoked.

  14. What special event does EventEmitter emit when an error occurs, and what happens if it is unhandled?

    The 'error' event. If no listener is registered for it, EventEmitter throws the error and the Node.js process typically crashes.

  15. How do you remove EventEmitter listeners?

    Use removeListener()/off() to remove a specific listener, or removeAllListeners() to remove all listeners for an event.

  16. What is the default maximum number of listeners per event in EventEmitter, and what happens when exceeded?

    The default limit is 10; exceeding it logs a MaxListenersExceededWarning (a possible memory-leak warning), which you can change with setMaxListeners().

  17. In Node.js, what is a callback function?

    A callback is a function passed as an argument to another function, to be invoked later once an operation (often asynchronous) completes.

  18. What is the Node.js error-first callback convention?

    The callback's first argument is an error object (null if no error) and subsequent arguments carry successful result data, e.g. function(err, data){...}.

  19. What is 'callback hell' (the pyramid of doom)?

    Deeply nested callbacks resulting from sequential asynchronous operations, producing code that is hard to read, maintain, and handle errors in.

  20. Name three techniques to avoid or mitigate callback hell.

    Use named functions instead of anonymous nesting, modularize code, and use Promises or async/await instead of nested callbacks.

  21. What is the difference between synchronous and asynchronous code execution?

    Synchronous code runs sequentially, blocking until each operation completes; asynchronous code initiates an operation and continues without waiting, handling the result later via a callback, Promise, or await.

  22. What is blocking versus non-blocking in Node.js?

    Blocking operations halt further JavaScript execution until they finish (e.g., fs.readFileSync); non-blocking operations return immediately and deliver results later, keeping the event loop free.

See more Core Concepts flashcards →

Planning Core Concepts for NodeJS

Core Concepts is about 13% of the NodeJS syllabus by topic count — 9 of 72 topics, spread over 3 chapters. At roughly 45 minutes per topic plus 12 minutes per sub-topic, a first pass runs to about 7 hours.

The heaviest chapters are Event-Driven Architecture (3 topics), Non-Blocking I/O (3 topics), Modules and Packages (3 topics) . Front-load those while your energy is high; the short chapters are better revision filler later.

Work top-down: read the chapter, then tick topics off individually rather than marking the whole chapter done. Sub-topics are where silent gaps hide.

Core Concepts (NodeJS) FAQ

What is in the NodeJS Core Concepts syllabus?

Core Concepts is split into 3 chapters — Event-Driven Architecture, Non-Blocking I/O and Modules and Packages, containing 9 topics and 0 sub-topics in total.

How many chapters are there in Core Concepts for NodeJS?

3 chapters. Core Concepts accounts for about 13% of the topics in the whole NodeJS syllabus (9 of 72).

How long should I spend on Core Concepts for NodeJS?

Budget around 7 hours for a first pass through Core Concepts — about 45 minutes per topic plus 12 minutes per sub-topic across its 9 topics. Add revision cycles on top.

Are there flashcards for NodeJS Core Concepts?

Yes — a 51-card Core Concepts deck. Sample cards are printed on this page, and the full deck is free in the Examius app with spaced repetition scheduling.