JavaScript Quiz: JSON

This JavaScript quiz checks the everyday use of JSON.stringify() and JSON.parse(). You will predict the JSON text for common values, see which values are dropped or changed, and spot invalid JSON.

आसान 10 सवाल ~5 मिनट पास होने के लिए 80% Node.js 22

मोड चुनें

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

सैंपल सवाल

सवाल 1 / 10

What does this print?

console.log(JSON.stringify({ a: 1, b: "x" }));
जवाब दिखाएं

B. {"a":1,"b":"x"} JSON.stringify() returns compact JSON text: keys in double quotes, numbers unquoted, no spaces. [object Object] is what String(obj) would give.

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

  • JSON.stringify() output for objects and arrays
  • What happens to undefined, functions, NaN and dates
  • JSON.parse() and the strict JSON syntax
  • Picking keys with a replacer and customizing with toJSON()
  • Circular references

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

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

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

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

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