ควิซ JavaScript: 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, เหรียญตรา และประวัติ

ทำซ้ำได้ไหม?

ได้ ระบบเก็บคะแนนที่ดีที่สุดไว้ และสลับคำถามกับตัวเลือกใหม่ทุกครั้ง