JavaScript Quiz: async/await

async and await let you write promise code that reads top to bottom. This quiz tests what async functions return, what happens when you forget await, sequential vs parallel waiting and why forEach does not wait for async callbacks.

मीडियम 10 सवाल ~6 मिनट पास होने के लिए 80% Node.js 22

मोड चुनें

आप गेस्ट के तौर पर खेल रहे हैं: XP और streak सेव रखने के लिए साइन इन करें।

सैंपल सवाल

सवाल 1 / 10

What does this print?

async function f() {
  return 1;
}
console.log(f() instanceof Promise);
जवाब दिखाएं

A. true An async function always returns a promise. The returned 1 becomes the promise's value, which you get with await f() or f().then(...).

इस क्विज़ में क्या है

  • async functions always return a promise
  • What a missing await gives you
  • Sequential vs parallel await
  • await in loops and the forEach trap
  • Where await is allowed

अक्सर पूछे जाने वाले सवाल

क्या अकाउंट ज़रूरी है?

नहीं। कोई भी खेल सकता है। XP, streak, badge और हिस्ट्री सेव रखने के लिए साइन इन करें।

क्या मैं इसे दोबारा दे सकता हूं?

हां। आपका बेस्ट स्कोर सेव रहता है, और हर बार सवाल और जवाब शफ़ल होते हैं।