1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-24 10:22:23 +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:
Ricardo Chan 2020-05-08 15:20:46 +08:00 committed by GitHub
parent d65a547832
commit 2f908a58ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -376,7 +376,7 @@ ES6 一共有 5 种方法可以遍历对象的属性。
**5Reflect.ownKeys(obj)**
`Reflect.ownKeys`返回一个数组,包含对象自身的所有键名,不管键名是 Symbol 或字符串,也不管是否可枚举。
`Reflect.ownKeys`返回一个数组,包含对象自身的(不含继承的)所有键名,不管键名是 Symbol 或字符串,也不管是否可枚举。
以上的 5 种方法遍历对象的键名,都遵守同样的属性遍历的次序规则。