*** 需要注意undefined,function,symbol会被转换和忽略 ***
1.如果是数组使用
let arr1 = [2,undefined] => JSON.stringify(arr1) => [2,null]
let arr2 = [2,function(){}] => JSON.stringify(arr2) => [2,null]
let arr3 = [2,symbol()] => JSON.stringify(arr3) => [2,null]
2.如果是对象使用
let obj1 = {a:1,b:undefined} => JSON.stringify(obj1) => {a:1}
let obj2 = {a:1,b:function(){}} => JSON.stringify(obj2) => {a:1}
let obj3 = {a:1,b:symbol()} => JSON.stringify(obj3) => {a:1}
3.如果是单独使用
JSON.stringify(undefined) => undefined
JSON.stringify(function(){}) => undefined
JSON.stringify(symbol()) => undefined