JavaScript Promises Quiz

Promises are the foundation of asynchronous JavaScript. This quiz tests how a promise settles, what each .then() passes to the next one, how rejections skip ahead to .catch() and what .finally() does with values.

Medium 10 questions ~6 minutes Pass at 80% Node.js 22

Choose a mode

Playing as a guest: sign in to keep your XP and streak.

Sample question

Question 1 of 10

What does this print?

const p = Promise.resolve(5);
console.log(typeof p, p instanceof Promise);
Show the answer

B. object true A promise is an object, so typeof gives 'object'. Promise.resolve(5) wraps the value 5; you get the 5 only inside .then() or with await.

What this quiz covers

  • Promise states and settling only once
  • Values flowing through a .then() chain
  • Returning a promise from .then()
  • .catch() and .finally() in a chain
  • Forgetting to return a promise

Questions people ask

Do I need an account?

No. Anyone can play. Sign in to keep your XP, streak, badges and history.

Can I retake it?

Yes. Your best score is kept, and the questions and answers are shuffled each time.