From 2f908a58ba3b09bc233c9880cb14e8f57bdb5274 Mon Sep 17 00:00:00 2001 From: Ricardo Chan Date: Fri, 8 May 2020 15:20:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84Reflect.ownkeys()=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E7=9A=84=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` 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 --- docs/object.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/object.md b/docs/object.md index b8f7511..ab7a5e9 100644 --- a/docs/object.md +++ b/docs/object.md @@ -376,7 +376,7 @@ ES6 一共有 5 种方法可以遍历对象的属性。 **(5)Reflect.ownKeys(obj)** -`Reflect.ownKeys`返回一个数组,包含对象自身的所有键名,不管键名是 Symbol 或字符串,也不管是否可枚举。 +`Reflect.ownKeys`返回一个数组,包含对象自身的(不含继承的)所有键名,不管键名是 Symbol 或字符串,也不管是否可枚举。 以上的 5 种方法遍历对象的键名,都遵守同样的属性遍历的次序规则。