Skip to content

Commit

Permalink
docs: update issue 346
Browse files Browse the repository at this point in the history
  • Loading branch information
toFrankie committed Aug 7, 2024
1 parent 07f9412 commit 5ad9e94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions archives/2024/346.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 老是记不住 isEmpty
number: '#346'
link: 'https://github.com/toFrankie/blog/issues/346'
created_at: '2024-08-07 16:48:22'
updated_at: '2024-08-07 17:36:55'
updated_at: '2024-08-07 17:38:44'
labels:
- '2024'
- JS
Expand All @@ -19,8 +19,8 @@ labels:

除了对象、数组,也常用来判断 null、undefined 等原始值。

* 字符串、数组、类数组: length 为 0 返回 true。
* 对象:自身 key length 为 0 返回 true。(对象本身的可枚举属性,原型上的不算)
* 字符串、数组、类数组: length 为 0 返回 true。
* 对象:获取本身可枚举的 key(原型上的不算),若 key length 为 0 返回 true。

对于 Falsy Value,有时得翻文档确认下:

Expand Down

0 comments on commit 5ad9e94

Please sign in to comment.