JSON.stringify()
2022年5月1日小于 1 分钟
JSON.stringify()
Question
What does the code snippet to the right output by console.log
?
Please refer to the format guide for cases like quotes in quotes
Snippet
// attention that for console.log('"a"'), you should enter ""a""
// please refer to format guide
console.log(JSON.stringify(['false', false]))
console.log(JSON.stringify([NaN, null, Infinity, undefined]))
console.log(JSON.stringify({a: null, b: NaN, c: undefined}))