// Practice Set · JS JSON · guest

Guest practice: this set is not saved and does not count.

Question 1 of 5 from: JSON Values

What does this log?

const d = JSON.parse('{"a":[1,2],"b":null,"c":"x"}');
console.log(typeof d.a, Array.isArray(d.a), d.b, typeof d.c);
Question 2 of 5 from: JSON Stringify

What does this log?

console.log(JSON.stringify({ a: 1, b: undefined, c: [undefined, NaN] }));
Question 3 of 5 from: JSON Fetch

fetch("missing.json") asks a working server for a file that does not exist, and the server answers 404. What happens?

Question 4 of 5 from: JSON HTML

A script on a page uses document.getElementById("list") but the <ul id="list"> comes AFTER the script. What goes wrong?

Question 5 of 5 from: JSON vs XML

In XML, every value is text unless the program reading it converts it.

Ready to submit?

Click a question to go back and check it. After you submit, you will see the right answer and an explanation for every question. As a guest, nothing is saved.