Quiz de 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.

Médio 10 perguntas ~6 minutos Aprovação com 80% Node.js 22

Escolha um modo

Jogando como visitante: entre para guardar seu XP e sua sequência.

Pergunta de exemplo

Pergunta 1 de 10

What does this print?

async function f() {
  return 1;
}
console.log(f() instanceof Promise);
Mostrar a resposta

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(...).

O que este quiz cobre

  • 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

Perguntas frequentes

Preciso de uma conta?

Não. Qualquer pessoa pode jogar. Entre para guardar seu XP, sequência, badges e histórico.

Posso refazer?

Pode. Sua melhor nota fica salva, e as perguntas e respostas são embaralhadas a cada vez.