1 hasOwnProperty

var a  = {b:1}
a.hasOwnProperty('b') true a.hasOwnProperty('c') false

2 in

判断一个对象中是否有指定属性

 

相关文章: