🌍 NodeJS · flashcards

NodeJS Core Concepts Flashcards

51 question-and-answer cards covering Core Concepts as it is examined in NodeJS. 24 of them are printed below, taken from across the deck — no signup, no paywall on the preview.

51Cards in deck
24Free preview
9Syllabus topics
~170Chars per answer
FreePrice

24 sample cards from the Core Concepts deck

Sampled from the end of the deck, so these are different cards from the ones shown on the syllabus page.

  1. How does Promise.allSettled() differ from Promise.all()?

    Promise.allSettled() waits for every promise to settle and never rejects; it returns an array of objects each with a status ('fulfilled' or 'rejected') and a value or reason.

  2. What does Promise.race() return?

    A promise that settles (fulfills or rejects) as soon as the first input promise settles, adopting that promise's value or reason.

  3. What does Promise.any() do?

    It fulfills as soon as any input promise fulfills; it rejects only if all promises reject, with an AggregateError containing all rejection reasons.

  4. What is promise chaining?

    Returning a value or new promise from a .then() handler so subsequent .then() calls process the resulting value in sequence, flattening asynchronous steps into a readable chain.

  5. In which queue are Promise resolution callbacks placed, and how does that affect timing?

    They are placed in the microtask queue, which is drained after the current operation and before the event loop moves to the next phase—so microtasks run before timers/setImmediate macrotasks.

  6. What is async/await in JavaScript?

    Syntactic sugar over Promises: the async keyword makes a function return a Promise, and await pauses execution inside that function until an awaited Promise settles, letting asynchronous code read like synchronous code.

  7. What does an async function always return?

    An async function always returns a Promise; returned values are wrapped in a resolved Promise, and thrown errors become a rejected Promise.

  8. How do you handle errors with async/await?

    Wrap awaited calls in a try/catch block; a rejected awaited Promise throws inside the try, which the catch handles.

  9. Where can the await keyword be used?

    Inside async functions, and at the top level of ES modules (top-level await); it cannot be used in ordinary synchronous functions.

  10. How can you run multiple asynchronous operations concurrently with async/await rather than sequentially?

    Start the operations without awaiting each immediately (or collect their promises) and await Promise.all() on them, instead of awaiting each one in turn, which would serialize them.

  11. What is CommonJS in Node.js?

    CommonJS is Node.js's original module system, which loads modules synchronously using require() to import and module.exports/exports to export.

  12. How do you export and import with CommonJS?

    Export by assigning to module.exports (or adding properties to exports); import with const x = require('./module').

  13. What is the difference between module.exports and exports in CommonJS?

    exports is initially a reference to module.exports; reassigning exports breaks that link, so to replace the whole export you must assign to module.exports directly. Only module.exports is actually returned by require().

  14. Is CommonJS module loading synchronous or asynchronous, and why does that matter?

    Synchronous—require() blocks until the module is loaded and evaluated. This suits server-side file access but is unsuitable for browsers where blocking network loads would harm performance.

  15. What are ES6 (ES) modules and which keywords do they use?

    The standardized ECMAScript module system using the import and export keywords for static, declarative module loading.

  16. How do you enable ES modules in a Node.js project?

    Use the .mjs file extension, or set "type": "module" in package.json so .js files are treated as ES modules.

  17. What is the difference between a default export and a named export in ES modules?

    A module can have one default export (export default ...) imported without braces under any name, and multiple named exports (export const foo) imported with braces by their exact names.

  18. Give three key differences between CommonJS and ES modules.

    1) Syntax: require/module.exports vs import/export. 2) Loading: CommonJS is synchronous/dynamic, ES modules are static and support asynchronous loading. 3) ES modules are strict mode by default and support top-level await, tree-shaking, and live bindings.

  19. What does 'static' analysis of ES module imports enable that CommonJS does not?

    Because import/export are resolved statically at parse time, tools can perform tree-shaking (dead-code elimination) and know the module graph before execution; CommonJS require() is dynamic and evaluated at runtime.

  20. What is npm?

    npm (Node Package Manager) is the default package manager for Node.js: a command-line tool and the world's largest registry for installing, sharing, and managing JavaScript packages and their dependencies.

  21. What is the purpose of the package.json file?

    It is the manifest for a Node.js project, defining metadata (name, version), scripts, and the project's dependencies and devDependencies.

  22. What is the difference between dependencies and devDependencies in package.json?

    dependencies are packages required at runtime in production; devDependencies are needed only during development and testing (e.g., test frameworks, linters) and are excluded with npm install --production.

  23. What does package-lock.json do?

    It records the exact resolved version and dependency tree of every installed package, ensuring reproducible, deterministic installs across environments.

  24. In semantic versioning MAJOR.MINOR.PATCH, what do the caret (^) and tilde (~) range specifiers mean?

    Given $MAJOR.MINOR.PATCH$: ^ allows updates that do not change the leftmost non-zero digit (typically MINOR and PATCH, e.g. ^1.2.3 permits <2.0.0), while ~ generally allows only PATCH-level updates (e.g. ~1.2.3 permits <1.3.0).

What this deck covers

The Core Concepts deck follows the NodeJS Core Concepts syllabus — 3 chapters and 9 topics — so questions land on material that is genuinely examinable rather than trivia around it. That works out to roughly 17.0 cards per chapter.

Answers are written to be recallable, not just readable — averaging about 170 characters, which is long enough to carry the reasoning and short enough to say out loud.

A deck like this earns its keep on the second and third pass. Read the syllabus first so you know the shape of the subject, then use the cards to find the specific facts that have not stuck.

Core Concepts flashcards FAQ

How many Core Concepts flashcards are in this NodeJS deck?

51 cards. This page previews 24 of them, sampled evenly across the deck so you can judge the difficulty before installing anything.

Are these NodeJS flashcards free?

Yes. The preview here is free to read with no signup, and the full 51-card deck is free inside the Examius app.

What do the Core Concepts cards cover?

They follow the NodeJS Core Concepts syllabus — 3 chapters and 9 topics — so the questions track what is actually examinable.

How should I use these flashcards?

Read the syllabus first so you know the shape of the subject, then drill the deck. Examius schedules each card with spaced repetition, so cards you keep missing come back sooner and ones you know drift further apart.