Skip to content

Commit 5820bcd

Browse files
committed
Clearly show that [] is truthy
Clearly show that [] is truthy
1 parent af81beb commit 5820bcd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,9 +1257,9 @@ Other Style Guides
12571257
+ **Strings** evaluate to **false** if an empty string `''`, otherwise **true**
12581258
12591259
```javascript
1260-
if ([0]) {
1260+
if ([0] && []) {
12611261
// true
1262-
// An array is an object, objects evaluate to true
1262+
// An array (even an empty one) is an object, objects will evaluate to true
12631263
}
12641264
```
12651265

0 commit comments

Comments
 (0)