Output-Based JavaScript Questions

This JavaScript quiz collects the "what does this print?" snippets that come up again and again in interviews. You will reason about typeof, type coercion, hoisting, this, sorting and the order of timers and promises.

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

मोड चुनें

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

सैंपल सवाल

सवाल 1 / 10

What does this print?

console.log(typeof null, typeof [], typeof NaN);
जवाब दिखाएं

A. object object number typeof null is "object", a famous historical bug. Arrays are objects (use Array.isArray() to tell them apart), and NaN is a value of type number.

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

  • typeof surprises and floating point results
  • Coercion with + and ==
  • Hoisting of var and function expressions
  • this in regular vs arrow callbacks
  • Microtasks vs setTimeout order

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

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

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

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

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