Skip to content
Jobless Busters
B · JavaScript, TypeScript and Node.jsQuestion 27 of 29Multiple choiceIntermediate

Order: synchronous code, Promise.then and setTimeout

In what order do the letters appear?

JavaScript
console.log('A');
Promise.resolve().then(() => console.log('B'));
setTimeout(() => console.log('C'), 0);

Choose one answer.

Source: Quiz question based on a card · AI & Agents Engineer

The answer and explanation come from the source card linked below.