COMPARISON OPERATORS (INTERVIEW FAVORITE) JavaScript comparison puzzle 👇 ✅ Output: true true false 🧠 Why this output comes? (Step-by-Step) 1️⃣ [] == false • [] → "" (toPrimitive) • "" → 0 • false → 0 ✅ 0 == 0 → true 2️⃣ [] == ![] • ![] → false (because objects are truthy) • Same conversion as above ✅ true 3️⃣ {} == false • {} → "[object Object]" • Converted to NaN • false → 0 ❌ NaN == 0 → false #JavaScript #InterviewQuestions #FrontendDeveloper #MERNStack #ReactJS #WebDevelopment
1.True 2.true 3.false
I guess True Ture True
JYOTI MISHRA, understanding type coercion in JavaScript can be tricky but provides essential insights for coding. Great breakdown.