hasOwnProperty 和 propertyIsEnumerable 的区别

hasOwnProperty 和 propertyIsEnumerable 的区别
最新回答
旧梦时光机丶

2022-04-19 06:28:14

关于hasOwnProperty 和 propertyIsEnumerable 的区别:
PropertyIsEnumerable
判断给定的属性是否可以用 for...in 语句进行枚举。

hasOwnProperty(property)
判断对象是否有某个特定的属性。必须用字符串指定该属性
希望对你有帮助