Parece simples até o entrevistador perguntar "why?". Abaixo, uma estrutura de resposta que dá conta do follow-up.
A callback is a function passed to another operation. Callbacks also suit repeated events, such as clicks. A Promise represents one eventual fulfillment value or rejection reason. It settles once, supports chaining and composition, and works with async/await.
Promises make dependent async steps and error propagation easier to compose than deeply nested callbacks. Return or await each promise in the chain. An unreturned async operation can fail outside the caller's catch.
Creating a Promise does not move CPU work to another thread, and its executor runs synchronously.
Ler é o primeiro passo. No app, essa pergunta vira flashcard com repetição espaçada, e o módulo tem quiz e simulado para testar o que ficou.
Treinar essa pergunta no app