← 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?
- A.The string '{"marks": 90}'
- B.A JavaScript object with a marks property equal to 90
- C.An array
- 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 →