← Back to archive

Stdle #43 · async · 2026-07-13

What does this JavaScript snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

async function a() { console.log('a'); }
async function b() { console.log('b'); await a(); console.log('c'); }
b();
Promise.resolve().then(() => console.log('d'));
Async
4 lines
4 attempts left

Answer & explanation