mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2025-05-24 18:32:22 +00:00
完善Reflect.ownkeys()方法的描述
``` Reflect.ownKeys(target) Returns an array of the target object's own (not inherited) property keys. ``` Refrence: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect
This commit is contained in:
parent
d65a547832
commit
2f908a58ba
@ -376,7 +376,7 @@ ES6 一共有 5 种方法可以遍历对象的属性。
|
|||||||
|
|
||||||
**(5)Reflect.ownKeys(obj)**
|
**(5)Reflect.ownKeys(obj)**
|
||||||
|
|
||||||
`Reflect.ownKeys`返回一个数组,包含对象自身的所有键名,不管键名是 Symbol 或字符串,也不管是否可枚举。
|
`Reflect.ownKeys`返回一个数组,包含对象自身的(不含继承的)所有键名,不管键名是 Symbol 或字符串,也不管是否可枚举。
|
||||||
|
|
||||||
以上的 5 种方法遍历对象的键名,都遵守同样的属性遍历的次序规则。
|
以上的 5 种方法遍历对象的键名,都遵守同样的属性遍历的次序规则。
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user