hasOwnProperty和propertyIsEnumerable的区别

发布时间:2019-08-11 05:42:45

hasOwnProperty 和 propertyIsEnumerable 的区别

推荐回答

PropertyIsEnumerable判断给定的属性是否可以用 for...in 语句进行枚举。hasOwnProperty(property)判断对象是否有某个特定的属性。必须用字符串指定该属性
以上问题属网友观点,不代表本站立场,仅供参考!