Something went wrong. Try again.
javascript for 🐜's, a tiny runtime with big ambitions antjs.org
Something went wrong. Try again.
123456789101112131415async function test() { console.log("1: Before await"); const x = await new Promise(resolve => setTimeout(() => { console.log("2: Timer callback"); resolve("VALUE"); }, 10)); console.log("3: x assigned, x =", x); console.log("4: About to return"); return x;}
console.log("A: Calling test");test().then(r => console.log("Final:", r));console.log("B: After test call");