欢迎来到Altaba的博客 2017年2月19日
1:通过hasOwnProperty方法判断
2:in运算符
3:propertyIsEnumerable()方法
4:!==undefined
总结:
in 自身存在的属性,继承的属性,返回true
hasOwnProperty() 自身存在的属性返回true,继承属性返回false
propertyIsEnumerable() 自身存在的属性,且为枚举属性返回true,
!== undefined 自身存在的属性,继承的属性,不能识别值为undefined的属性