{
  "assessmentTests": {
    "javascript_test": {
      "name": "JavaScript परीक्षण",
      "desc": "कोर सिंटैक्स और जबरदस्ती, फ़ंक्शन/स्कोप/क्लोजर और this, ऑब्जेक्ट/arrays और डेटा संरचनाएं, और इवेंट लूप/async/prototype मुहावरे पर 30 परिदृश्य प्रश्न — पता लगाएँ कि क्या आपका JavaScript उस से मेल खाता है जो नौकरी की पोस्टिंग JavaScript प्रदर्शन से मतलब है।",
      "recommendation": "आपकी JavaScript कौशल प्रोफ़ाइल",
      "results": {
        "beginner": {
          "name": "शुरुआत",
          "desc": "आप काम करने वाले फ़ंक्शन और ऑब्जेक्ट लिख सकते हैं, लेकिन जो प्रश्न आप चूक गए हैं वे सिंटैक्स के बजाय टाइप जबरदस्ती और संदर्भ सिमेंटिक्स के आसपास क्लस्टर करते हैं — == तुरंत तुलना से पहले टाइप को बदलते हैं, एक array असाइनमेंट जो एक ऑब्जेक्ट साझा करता है बजाय इसे कॉपी करने के लिए, NaN कभी भी खुद के बराबर क्यों नहीं है। यह JavaScript में बुरा होने के बारे में कुछ भी नहीं है; ये वह विशिष्ट नियम हैं जो उन लोगों को ट्रिप करते हैं जिन्होंने ऐसी भाषा सीखी है जो वास्तव में काम करता है बजाय यह सीखने के कि मान और संदर्भ वास्तव में कैसे व्यवहार करते हैं। यह काम पर मायने रखता है क्योंकि प्रत्येक एक ऐसी जगह है जहां कोड कोई त्रुटि के बिना चलता है और फिर भी गलत काम करता है।",
          "recommendation": "इस क्रम में तीन चीजों से शुरुआत करें: तुलना से पहले == क्यों टाइप मजबूर करता है जबकि === नहीं करता है, एक array या ऑब्जेक्ट को एक नए वेरिएबल में असाइन करना मान के बजाय संदर्भ को क्यों कॉपी करता है, और var कैसे होस्ट किया जाता है और undefined को इनिशियलाइज किया जाता है जबकि let और const तब तक टेम्पोरल डेड जोन में रहते हैं जब तक उनकी घोषणा वास्तव में चलती है। MDN की JavaScript गाइड सभी तीन को रनेबल उदाहरणों के साथ कवर करती है।"
        },
        "intermediate": {
          "name": "मध्यवर्ती",
          "desc": "आप रोजमर्रा के एप्लिकेशन कोड को आराम से संभालते हैं — फ़ंक्शन, array methods, सीधे नियंत्रण प्रवाह — और नियमित सुविधा काम से धीमा नहीं होंगे। यहां और Advanced के बीच का अंतर मुख्य रूप से इस में है कि क्या होता है जब JavaScript के scoping और timing नियम इंटरैक्ट करते हैं: एक var जो एक लूप के कॉलबैक के अंदर कैप्चर किया गया है जो सभी एक ही अंतिम मान को पढ़ते हैं, एक this जो एक बार silent होकर ऑब्जेक्ट को इंगित करना बंद करता है जब एक method इससे अलग होता है, एक spread copy जो गहरा दिखता है लेकिन केवल एक स्तर की कॉपी करता है। ये वह तरह की bugs हैं जो एक त्वरित read के माध्यम से पास करते हैं और केवल एक विशिष्ट रनटाइम स्थिति के तहत दिखाई देते हैं।",
          "recommendation": "इस बात पर ध्यान दें कि definition time के बजाय call time पर scope और this वास्तव में कैसे resolve होते हैं: एक var-based for loop प्रत्येक callback को एक ही अंतिम काउंटर वैल्यू क्यों देता है जबकि let नहीं करता है, this कैसे निर्धारित होता है कि एक function कैसे कहा जाता है जहां यह लिखा होता है बजाय, और एक spread या Object.assign केवल एक ऑब्जेक्ट के शीर्ष स्तर को ही क्यों कॉपी करता है। फिर event loop, क्योंकि यह वह है जो उन लोगों को ट्रिप करता है जो पहले से ही promises को व्यक्तिगत रूप से जानते हैं।"
        },
        "advanced": {
          "name": "उन्नत",
          "desc": "यह वह स्तर है जिसका अधिकांश job posting \"मजबूत JavaScript\" कहते समय मतलब है। आप filter/map/reduce की एक chain को पढ़ते हैं और सटीक रूप से भविष्य कर सकते हैं कि यह मूल array को mutate किए बिना क्या लौटता है, आप जानते हैं कि एक सिंक्रोनस console.log हमेशा एक microtask को हराता है जो हमेशा एक setTimeout को हराता है, और आप Promise.all तक पहुंचते हैं यह जानकर कि यह तुरंत reject करता है जैसे ही कोई भी promise करता है बजाय बाकी के लिए इंतजार करने के। जो इस बैंड को शीर्ष से अलग करता है वह काम का prototype और object-model पक्ष है: कैसे prototype chain एक विरासत method को hasOwnProperty के विपरीत resolve करता है, और एक private class field वास्तव में क्या छुपाता है।",
          "recommendation": "उन हिस्सों में धकेलें जो state की रक्षा करते हैं जिसे अन्य code भी छूते हैं: कैसे JavaScript का prototype chain method lookups को resolve करता है जो instance पर नहीं हैं, एक class का private #fields बाहरी पहुंच से वास्तव में क्या छुपाता है, और JSON.stringify undefined और functions को एक plain object के अंदर बनाम एक array के अंदर अलग तरह से कैसे मानता है। Event loop और prototype chain पर MDN की सामग्री दोनों के लिए अगला प्राकृतिक कदम है।"
        },
        "expert": {
          "name": "विशेषज्ञ",
          "desc": "आपने हर सेक्शन के शीर्ष पर स्कोर किया — कोर सिंटैक्स, types और coercion; functions, scope, closures और this; objects, arrays और data structures; और async, event loop, prototypes और idioms। व्यावहारिक रूप से, इसका मतलब है कि आप एक अजनबी फ़ंक्शन को हाथ में ले सकते हैं और समझा सकते हैं कि यह क्या लौटता है, केवल यह नहीं कि सिंटैक्स कहता है कि इसे क्या करना चाहिए, जो कि कठिन और अधिक मूल्यवान कौशल है। इस स्तर पर भाषा स्वयं शायद ही कभी सीमित करने वाला कारक है; सीमा आमतौर पर async control flow या इसके नीचे डेटा का आकार है।",
          "recommendation": "रिटर्न अब डिज़ाइन और diagnosis में हैं: Promise.all और Promise.race के बीच race condition के बारे में सोचना बजाय उनकी परिभाषाएं दोहराना, यह चुनना कि जब एक closure private state के लिए सही tool है बजाय जब एक class का private field है, और एक quiz में बजाय production logs में एक microtask-vs-macrotask ordering bug को पढ़ना। यदि आप एक role के लिए स्क्रीन किए जा रहे हैं, तो एक timing bug का वर्णन करें जो आपने पाया — एक stale closure variable या एक out-of-order async callback — JavaScript features का नाम देने के बजाय; यह सोच को प्रदर्शित करता है, केवल शब्दावली नहीं।"
        }
      },
      "questions": [
        {
          "question": "console.log(x);\nvar x = 5;\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "5 — var declarations तुरंत चलती हैं, किसी भी अन्य code से पहले"
            },
            {
              "icon": "",
              "label": "ReferenceError: x is not defined"
            },
            {
              "icon": "",
              "label": "undefined — var declarations को उनके scope के शीर्ष पर होisted किया जाता है और undefined को initialize किया जाता है, लेकिन assignment जगह पर execute होता है, तो इससे पहले कि यह variable है लेकिन undefined hold करता है"
            },
            {
              "icon": "",
              "label": "null"
            }
          ]
        },
        {
          "question": "console.log(y);\nlet y = 5;\nक्या होता है?",
          "options": [
            {
              "icon": "",
              "label": "यह ReferenceError throws करता है: Cannot access 'y' before initialization — let को अपने scope के शीर्ष पर hoisted किया जाता है लेकिन यह temporal dead zone में रहता है जब तक declaration line वास्तव में execute नहीं होती"
            },
            {
              "icon": "",
              "label": "यह undefined प्रिंट करता है, जैसा कि var करेगा"
            },
            {
              "icon": "",
              "label": "यह 5 प्रिंट करता है"
            },
            {
              "icon": "",
              "label": "यह parse time पर SyntaxError throws करता है"
            }
          ]
        },
        {
          "question": "const arr = [1, 2, 3];\narr.push(4);\nconsole.log(arr.length);\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "4 — const केवल arr binding को reassign करने से रोकता है, जिस array ऑब्जेक्ट पर यह points करता है उसे mutate नहीं करता है, तो push अभी भी काम करता है"
            },
            {
              "icon": "",
              "label": "यह TypeError throws करता है, क्योंकि arr const है"
            },
            {
              "icon": "",
              "label": "3 — push एक const array पर blocked है"
            },
            {
              "icon": "",
              "label": "undefined"
            }
          ]
        },
        {
          "question": "console.log('' == 0);\nconsole.log('' === 0);\nदोनों लाइनें क्या प्रिंट करती हैं?",
          "options": [
            {
              "icon": "",
              "label": "true फिर true"
            },
            {
              "icon": "",
              "label": "false फिर false"
            },
            {
              "icon": "",
              "label": "true फिर false — == तुलना से पहले empty string को 0 में coerce करता है, जबकि === coercion के बिना type और value की तुलना करता है, और एक string कभी भी एक number के बराबर नहीं है"
            },
            {
              "icon": "",
              "label": "false फिर true"
            }
          ]
        },
        {
          "question": "console.log(NaN === NaN);\nconsole.log(Number.isNaN(NaN));\nदोनों लाइनें क्या प्रिंट करती हैं?",
          "options": [
            {
              "icon": "",
              "label": "true फिर true"
            },
            {
              "icon": "",
              "label": "true फिर false"
            },
            {
              "icon": "",
              "label": "false फिर false"
            },
            {
              "icon": "",
              "label": "false फिर true — NaN JavaScript में एकमात्र value है जो === के तहत खुद के बराबर नहीं है, लेकिन Number.isNaN() फिर भी इसे सही तरीके से detect करता है"
            }
          ]
        },
        {
          "question": "console.log(typeof null);\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "\"null\""
            },
            {
              "icon": "",
              "label": "\"object\" — भाषा में एक long-standing bug: typeof null \"object\" return करता है हालांकि null एक primitive है, और यह backward compatibility के लिए तब से रखा गया है"
            },
            {
              "icon": "",
              "label": "\"undefined\""
            },
            {
              "icon": "",
              "label": "\"boolean\""
            }
          ]
        },
        {
          "question": "निम्नलिखित में से कौन सा एक if condition में उपयोग किए जाने पर truthy है?",
          "options": [
            {
              "icon": "",
              "label": "0"
            },
            {
              "icon": "",
              "label": "\"\" (एक empty string)"
            },
            {
              "icon": "",
              "label": "null"
            },
            {
              "icon": "",
              "label": "\"0\" — एक non-empty string JavaScript में हमेशा truthy होता है, भले ही इसकी content स्वयं string \"0\" हो"
            }
          ]
        },
        {
          "question": "foo();\nfunction foo() { console.log('a'); }\nbar();\nvar bar = function() { console.log('b'); };\nक्या होता है?",
          "options": [
            {
              "icon": "",
              "label": "दोनों calls print करते हैं, \"a\" फिर \"b\""
            },
            {
              "icon": "",
              "label": "foo() \"a\" प्रिंट करता है; bar() TypeError throws करता है: bar is not a function — function declarations पूरी तरह से अपने body के साथ hoisted होते हैं, लेकिन एक var-assigned function expression केवल var को ही hoist करता है (undefined के रूप में), assignment को नहीं"
            },
            {
              "icon": "",
              "label": "दोनों calls ReferenceError throw करते हैं"
            },
            {
              "icon": "",
              "label": "foo() throws; bar() \"b\" प्रिंट करता है"
            }
          ]
        },
        {
          "question": "function makeCounter() {\n  let count = 0;\n  return function() { count++; return count; };\n}\nconst counter = makeCounter();\nconsole.log(counter());\nconsole.log(counter());\nदोनों लाइनें क्या प्रिंट करती हैं?",
          "options": [
            {
              "icon": "",
              "label": "1 फिर 1"
            },
            {
              "icon": "",
              "label": "0 फिर 1"
            },
            {
              "icon": "",
              "label": "undefined फिर undefined"
            },
            {
              "icon": "",
              "label": "1 फिर 2 — returned function makeCounter के scope से एक ही count variable को close करता है, और यह variable calls के बीच persist करता है reset के बजाय"
            }
          ]
        },
        {
          "question": "for (var i = 0; i < 3; i++) {\n  setTimeout(() => console.log(i), 0);\n}\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "0, 1, 2"
            },
            {
              "icon": "",
              "label": "3, 3, 3 — var function-scoped है, block-scoped नहीं, तो सभी तीन callbacks एक ही i को close करते हैं, जो पहले से loop खत्म कर चुका है और जब भी कोई actually run हो तो 3 के बराबर है"
            },
            {
              "icon": "",
              "label": "0, 0, 0"
            },
            {
              "icon": "",
              "label": "undefined, undefined, undefined"
            }
          ]
        },
        {
          "question": "for (let i = 0; i < 3; i++) {\n  setTimeout(() => console.log(i), 0);\n}\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "3, 3, 3"
            },
            {
              "icon": "",
              "label": "0, 0, 0"
            },
            {
              "icon": "",
              "label": "undefined, undefined, undefined"
            },
            {
              "icon": "",
              "label": "0, 1, 2 — let प्रत्येक loop iteration के लिए i का एक fresh binding बनाता है, तो प्रत्येक callback एक shared variable के बजाय अपनी अलग copy को close करता है"
            }
          ]
        },
        {
          "question": "function greet() { return `Hi, ${this.name}`; }\nconst person = { name: 'Ana' };\nconsole.log(greet.call(person));\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "\"Hi, Ana\" — Function.prototype.call function को invoke करता है जिसमें this explicitly अपने पहले argument के रूप में सेट किया जाता है, तो this.name person के विरुद्ध resolve होता है"
            },
            {
              "icon": "",
              "label": "\"Hi, undefined\" — call() केवल functions पर काम करता है जो पहले से ऑब्जेक्ट के methods हैं"
            },
            {
              "icon": "",
              "label": "यह TypeError throws करता है, क्योंकि greet person का एक method नहीं है"
            },
            {
              "icon": "",
              "label": "\"Hi, ${this.name}\" — call() template literal को evaluate नहीं करता है"
            }
          ]
        },
        {
          "question": "const timer = {\n  seconds: 0,\n  start: function() {\n    setInterval(() => { this.seconds++; }, 1000);\n  },\n};\nलोग यहां setInterval के अंदर function() { this.seconds++ } पर arrow function को क्यों प्राथमिकता देते हैं?",
          "options": [
            {
              "icon": "",
              "label": "Arrow functions का अपना this नहीं है — वे encompassing start function से this को lexically capture करते हैं, जो timer है (क्योंकि start को timer.start() के रूप में बुलाया गया था), तो this.seconds हर tick पर timer.seconds को सही तरीके से refer करता है"
            },
            {
              "icon": "",
              "label": "Arrow functions runtime पर regular functions से faster execute होते हैं"
            },
            {
              "icon": "",
              "label": "Arrow functions automatically this को global object से bind करते हैं, जो timer के बराबर होता है"
            },
            {
              "icon": "",
              "label": "Arrow functions automatically this को एक global variable में convert करते हैं"
            }
          ]
        },
        {
          "question": "function multiply(a, b) { return a * b; }\nconst double = multiply.bind(null, 2);\nconsole.log(double(5));\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "यह error throw करता है, क्योंकि bind को दोनों arguments advance में चाहिए"
            },
            {
              "icon": "",
              "label": "10 — bind एक नया function return करता है जिसमें this और कोई भी leading arguments pre-set होते हैं; double(5) को call करना remaining argument b=5 supply करता है, तो multiply(2, 5) run होता है"
            },
            {
              "icon": "",
              "label": "NaN"
            },
            {
              "icon": "",
              "label": "7, क्योंकि bind अपने arguments को call में जोड़ता है बजाय उन्हें substitute करने के"
            }
          ]
        },
        {
          "question": "function outer() {\n  let x = 10;\n  function inner() {\n    let x = 20;\n    console.log(x);\n  }\n  inner();\n  console.log(x);\n}\nouter();\nदोनों console.log calls क्या प्रिंट करती हैं?",
          "options": [
            {
              "icon": "",
              "label": "20 फिर 20"
            },
            {
              "icon": "",
              "label": "20 फिर 10 — inner का अपना let x outer के x को केवल inner के scope में shadow करता है; outer का अपना x कभी touch नहीं होता है"
            },
            {
              "icon": "",
              "label": "10 फिर 10"
            },
            {
              "icon": "",
              "label": "यह ReferenceError throws करता है, क्योंकि x दो बार declare किया गया है"
            }
          ]
        },
        {
          "question": "const a = [1, 2, 3];\nconst b = a;\nb.push(4);\nconsole.log(a.length);\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "3 — b एक separate copy of a है"
            },
            {
              "icon": "",
              "label": "undefined"
            },
            {
              "icon": "",
              "label": "यह TypeError throws करता है, क्योंकि a const है"
            },
            {
              "icon": "",
              "label": "4 — arrays objects हैं, तो const b = a reference को copy करता है, array को नहीं; b को mutate करना push के माध्यम से उसी exact array को भी mutate करता है जो a points करता है"
            }
          ]
        },
        {
          "question": "const original = { name: 'Ana', tags: ['x', 'y'] };\nconst copy = { ...original };\ncopy.name = 'Bea';\ncopy.tags.push('z');\nconsole.log(original.name, original.tags.length);\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "'Ana' 2 — spread हर nested object और array को deep-clone करता है"
            },
            {
              "icon": "",
              "label": "'Ana' 3 — spread केवल एक shallow copy है: एक primitive property जैसे name को value से copy किया जाता है, तो copy.name को reassign करना कभी original को touch नहीं करता है, लेकिन एक nested array जैसे tags को reference से copy किया जाता है, तो copy.tags में push करना उसी exact array को mutate करता है जो original.tags points करता है"
            },
            {
              "icon": "",
              "label": "'Bea' 3 — spread सब कुछ को reference से copy करता है, तो both top-level और nested changes original पर वापस आते हैं"
            },
            {
              "icon": "",
              "label": "'Bea' 2"
            }
          ]
        },
        {
          "question": "const { a: x = 10, b: y = 20 } = { a: 5 };\nconsole.log(x, y);\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "undefined undefined"
            },
            {
              "icon": "",
              "label": "5 undefined"
            },
            {
              "icon": "",
              "label": "10 20"
            },
            {
              "icon": "",
              "label": "5 20 — a को x में rename किया गया है और यह present है, तो यह अपनी value 5 रखता है; b को y में rename किया गया है और यह absent है, तो यह अपने default 20 पर fallback करता है"
            }
          ]
        },
        {
          "question": "const [first, ...rest] = [1, 2, 3, 4];\nconsole.log(rest);\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "[1, 2, 3, 4]"
            },
            {
              "icon": "",
              "label": "[2, 3, 4] — rest first के बाद हर remaining element को एक brand new array में gather करता है"
            },
            {
              "icon": "",
              "label": "2"
            },
            {
              "icon": "",
              "label": "[1]"
            }
          ]
        },
        {
          "question": "const nums = [10, 1, 2];\nnums.sort();\nconsole.log(nums);\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "[1, 2, 10] — sort हमेशा numbers को numerically ascending order में default से order करता है"
            },
            {
              "icon": "",
              "label": "[10, 1, 2] — sort original array को mutate नहीं करता है"
            },
            {
              "icon": "",
              "label": "[1, 10, 2] — Array.prototype.sort का default comparator elements को strings में convert करता है और उन्हें lexicographically compare करता है, तो \"10\" \"2\" से पहले sort होता है; sort भी array को in place mutate करता है एक नया return करने के बजाय"
            },
            {
              "icon": "",
              "label": "[2, 1, 10]"
            }
          ]
        },
        {
          "question": "const user = { profile: { age: 0 } };\nconsole.log(user.profile?.age ?? 'unknown');\nconsole.log(user.address?.city ?? 'unknown');\nदोनों लाइनें क्या प्रिंट करती हैं?",
          "options": [
            {
              "icon": "",
              "label": "'unknown' फिर 'unknown' — ?? 0 को missing के रूप में treat करता है, जिस तरह से || करता है"
            },
            {
              "icon": "",
              "label": "0 फिर 'unknown' — ?? केवल null या undefined पर fallback करता है, 0 जैसे अन्य falsy values पर नहीं, तो age (0) को as-is रखा जाता है; user.address undefined है, तो ?. पूरे chain को short-circuit करता है undefined और ?? फिर 'unknown' supply करता है"
            },
            {
              "icon": "",
              "label": "0 फिर undefined"
            },
            {
              "icon": "",
              "label": "'unknown' फिर 0"
            }
          ]
        },
        {
          "question": "const obj = { a: undefined, b: function(){}, c: NaN, d: [undefined, function(){}, 1] };\nconsole.log(JSON.stringify(obj));\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "'{\"a\":null,\"b\":null,\"c\":null,\"d\":[null,null,1]}' — हर unsupported value everywhere null बन जाता है, objects और arrays दोनों में"
            },
            {
              "icon": "",
              "label": "'{\"a\":undefined,\"b\":undefined,\"c\":NaN,\"d\":[undefined,null,1]}'"
            },
            {
              "icon": "",
              "label": "'{\"c\":null,\"d\":[null,null,1]}' — object properties जिनकी value undefined या एक function है वे पूरी तरह से omitted होती हैं, और NaN null में serialize होता है, लेकिन एक array के अंदर वे ही unsupported values null बन जाते हैं बजाय drop किए जाने के, क्योंकि एक array element को remove करने से हर बाद index shift होता है"
            },
            {
              "icon": "",
              "label": "यह TypeError throws करता है, क्योंकि NaN को JSON में serialize नहीं किया जा सकता"
            }
          ]
        },
        {
          "question": "console.log('1');\nsetTimeout(() => console.log('2'), 0);\nPromise.resolve().then(() => console.log('3'));\nconsole.log('4');\nये किस क्रम में प्रिंट होते हैं?",
          "options": [
            {
              "icon": "",
              "label": "1, 2, 3, 4"
            },
            {
              "icon": "",
              "label": "1, 4, 2, 3"
            },
            {
              "icon": "",
              "label": "1, 4, 3, 2 — synchronous code पहले run होता है (तो 1 और 4 तुरंत print होते हैं), फिर microtask queue (Promise callbacks) पूरी तरह से drain होती है event loop अगले macrotask पर जाने से पहले, तो 3 setTimeout callback के 2 से पहले print होता है"
            },
            {
              "icon": "",
              "label": "1, 3, 4, 2"
            }
          ]
        },
        {
          "question": "async function foo() {\n  console.log('a');\n  await null;\n  console.log('b');\n}\nconsole.log('start');\nfoo();\nconsole.log('end');\nये किस क्रम में प्रिंट होते हैं?",
          "options": [
            {
              "icon": "",
              "label": "start, a, end, b — foo() अपने पहले await तक synchronously run होता है, तो 'a' तुरंत print होता है जब foo() call होता है; await फिर foo को suspend करता है और control को caller को return करता है, तो 'end' print होता है resumed 'b' से पहले, जो बाद में एक microtask के रूप में run होता है"
            },
            {
              "icon": "",
              "label": "start, a, b, end"
            },
            {
              "icon": "",
              "label": "start, end, a, b"
            },
            {
              "icon": "",
              "label": "a, start, end, b"
            }
          ]
        },
        {
          "question": "Promise.all([\n  Promise.resolve(1),\n  Promise.reject('err'),\n  Promise.resolve(3),\n]).then(r => console.log('ok', r)).catch(e => console.log('fail', e));\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "'fail err' — Promise.all तुरंत reject करता है जैसे ही कोई भी input promises reject करता है, बाकी के results को ignore करता है, तो catch handler उस rejection की reason के साथ run होता है"
            },
            {
              "icon": "",
              "label": "'ok' [1, 3]"
            },
            {
              "icon": "",
              "label": "'ok' [1, undefined, 3]"
            },
            {
              "icon": "",
              "label": "यह synchronously throw करता है और कोई भी handler कभी run नहीं होता है"
            }
          ]
        },
        {
          "question": "const fast = new Promise(res => setTimeout(() => res('fast'), 10));\nconst slow = new Promise(res => setTimeout(() => res('slow'), 100));\nPromise.race([fast, slow]).then(v => console.log(v));\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "'slow'"
            },
            {
              "icon": "",
              "label": "['fast', 'slow']"
            },
            {
              "icon": "",
              "label": "'fast' — Promise.race तुरंत settle होता है जैसे ही इसके input promises में से पहला settle होता है, और 10ms timer 100ms वाले से काफी पहले resolve होता है"
            },
            {
              "icon": "",
              "label": "यह error throw करता है, क्योंकि race को exactly दो promises चाहिए"
            }
          ]
        },
        {
          "question": "function Animal(name) { this.name = name; }\nAnimal.prototype.speak = function() { return `${this.name} makes a sound`; };\nconst dog = new Animal('Rex');\nconsole.log(dog.speak());\nconsole.log(dog.hasOwnProperty('speak'));\nदोनों लाइनें क्या प्रिंट करती हैं?",
          "options": [
            {
              "icon": "",
              "label": "'Rex makes a sound' फिर true"
            },
            {
              "icon": "",
              "label": "undefined फिर false"
            },
            {
              "icon": "",
              "label": "यह TypeError throw करता है, क्योंकि dog के पास अपना speak method नहीं है"
            },
            {
              "icon": "",
              "label": "'Rex makes a sound' फिर false — speak को Animal.prototype पर define किया गया है, dog instance पर नहीं; dog इसे prototype chain के माध्यम से find करता है जब यह call होता है, लेकिन hasOwnProperty केवल instance के own properties check करता है, कोई inherited चीज़ नहीं"
            }
          ]
        },
        {
          "question": "class Counter {\n  #count = 0;\n  increment() { this.#count++; return this.#count; }\n}\nconst c = new Counter();\nconsole.log(c.increment());\nconsole.log(c.count);\nदोनों लाइनें क्या प्रिंट करती हैं?",
          "options": [
            {
              "icon": "",
              "label": "1 फिर undefined — #count एक private class field है, केवल class के own methods से ही readable और writable है; c.count (#के बिना) एक completely अलग, ordinary property है जो कभी set नहीं किया गया था, तो यह undefined है"
            },
            {
              "icon": "",
              "label": "1 फिर 0"
            },
            {
              "icon": "",
              "label": "1 फिर 1"
            },
            {
              "icon": "",
              "label": "यह SyntaxError throw करता है c.count को access करते समय"
            }
          ]
        },
        {
          "question": "const items = ['a', 'b'];\nconst label = `Items: ${items.length > 0 ? items.join(', ') : 'none'}`;\nconsole.log(label);\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "'Items: ${items.length > 0 ? items.join(\\', \\') : \\'none\\'}'"
            },
            {
              "icon": "",
              "label": "'Items: none'"
            },
            {
              "icon": "",
              "label": "'Items: a, b' — template literals ${...} के अंदर रखी गई किसी भी expression को evaluate करते हैं, एक complete ternary सहित, और इसके result को directly string में interpolate करते हैं"
            },
            {
              "icon": "",
              "label": "यह SyntaxError throw करता है, क्योंकि ternaries template literals के अंदर allowed नहीं हैं"
            }
          ]
        },
        {
          "question": "const nums = [1, 2, 3, 4, 5];\nconst result = nums.filter(n => n % 2 === 0).map(n => n * 10).reduce((sum, n) => sum + n, 0);\nconsole.log(result, nums);\nयह क्या प्रिंट करता है?",
          "options": [
            {
              "icon": "",
              "label": "60 [1, 2, 3, 4, 5] — filter, map और reduce हर एक एक new array या value return करते हैं original array को mutate किए बिना, तो nums unchanged है जबकि result final reduced sum है (2 और 4, 20 और 40 को doubled, 60 को summed)"
            },
            {
              "icon": "",
              "label": "60 [2, 4, 20, 40]"
            },
            {
              "icon": "",
              "label": "150 [1, 2, 3, 4, 5]"
            },
            {
              "icon": "",
              "label": "60 [20, 40]"
            }
          ]
        }
      ],
      "optionOrderVersion": "50fc0eba818f2d72"
    }
  }
}
