1 // var num=parseInt(Math.random()*10) ?2 // console.log(num) 3 // console.log(2+9+"") 4 // console.log(typeof(2+9+"")) 5 ?6 // console.log(2+""+9) 7 // console.log(""+2+9) 8 ?9 10 11 var obj={12 ????"name":"Jack",13 ????"age":24,14 ????"gender":"male"15 }16 17 // console.log("weqweqwe" in obj)18 console.log(obj.hasOwnProperty("name"))
js 判断json 是否存在某个key
原文地址:https://www.cnblogs.com/Mengchangxin/p/10337625.html