Chapter quiz · Async in Node

Test what you learned.

8 questions on Async in Node. Pass 70% to clear the chapter.

← Review chapter lessons

Quiz

Async in Node — Chapter Quiz

Eight questions on the event loop, promises, workers, timers.

0/ 8
  1. Question 1
    1

    How many threads run your JavaScript by default in Node?

  2. Question 2
    2

    Promise .then callbacks (microtasks) run before the next setTimeout callback.

  3. Question 3
    3

    How do you cancel an in-flight fetch?

  4. Question 4
    4

    Which is best for CPU-heavy work?

  5. Question 5
    5

    What does this code print?

    console.log("1");
    Promise.resolve().then(() => console.log("2"));
    setTimeout(() => console.log("3"), 0);
    console.log("4");
    
  6. Question 6
    6

    The promise-based version of setTimeout lives in node:timers/___.

  7. Question 7
    7

    What's setImmediate(fn)'s difference from setTimeout(fn, 0)?

  8. Question 8
    8

    What is the BEST way to convert a callback-style API to promises?

Pick an answer — instant feedback as you go.