🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Functions, Arrays and Objects: all 10 questions

Quiz: Functions, Arrays and Objects · Question 9 of 10

What does JSON.parse('{"marks": 90}') return?

What does JSON.parse('{"marks": 90}') return?

  1. A.The string '{"marks": 90}'
  2. B.A JavaScript object with a marks property equal to 90
  3. C.An array
  4. D.undefined
Answer & explanation

Correct answer: A JavaScript object with a marks property equal to 90

JSON.parse turns JSON text into a value; JSON.stringify does the reverse.

Can you get the rest right without peeking?

Take the timed Quiz: Functions, Arrays and Objects quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →