There was an error while loading. Please reload this page.
1 parent bb7b58d commit 43d1361Copy full SHA for 43d1361
contents/basic/emptyObject.md
@@ -17,6 +17,7 @@ var a = {};
17
obj // 👈 null and undefined check
18
&& Object.keys(obj).length === 0
19
&& Object.getPrototypeOf(obj) === Object.prototype
20
+&& Object.getOwnPropertySymbols(obj).length === 0 // 译者补充:增加非枚举属性
21
```
22
23
但是请注意,这会创建一个不必要的数组(`key` 的返回值)
0 commit comments