JavaScript Tricky Question: Async Await and Event Loop

🚀 30 Days of JavaScript Tricky Questions – Day 1 Let’s start with async / await + event loop 🧠 async function foo() { console.log('A'); setTimeout(() => console.log('B'), 0); await Promise.resolve(); console.log('C'); } foo(); console.log('D'); ❓ What will be the output and why? 💬 Drop your answer in the comments #JavaScript #JSInterview #AsyncJavaScript #FrontendDeveloper #WebDevelopment #30DaysOfJavaScript

To view or add a comment, sign in

Explore content categories