Квиз по JavaScript: async/await

async and await let you write promise code that reads top to bottom. This quiz tests what async functions return, what happens when you forget await, sequential vs parallel waiting and why forEach does not wait for async callbacks.

Средний 10 вопроса ~6 минуты Проходной балл: 80% Node.js 22

Выберите режим

Вы играете как гость: войдите, чтобы сохранить XP и серию.

Пример вопроса

Вопрос 1 из 10

What does this print?

async function f() {
  return 1;
}
console.log(f() instanceof Promise);
Показать ответ

A. true An async function always returns a promise. The returned 1 becomes the promise's value, which you get with await f() or f().then(...).

Что проверяет этот квиз

  • async functions always return a promise
  • What a missing await gives you
  • Sequential vs parallel await
  • await in loops and the forEach trap
  • Where await is allowed

Частые вопросы

Нужен ли аккаунт?

Нет. Играть может любой. Войдите, чтобы сохранять XP, серию, значки и историю.

Можно пройти ещё раз?

Да. Лучший результат сохраняется, а вопросы и ответы каждый раз перемешиваются.