Skip to content

Commit 9498b3f

Browse files
committed
Clearly show that [] is truthy
1 parent 397f5bb commit 9498b3f

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
@@ -1250,9 +1250,9 @@ Other Style Guides
12501250
+ **Strings** evaluate to **false** if an empty string `''`, otherwise **true**
12511251
12521252
```javascript
1253-
if ([0]) {
1253+
if ([0] && []) {
12541254
// true
1255-
// An array is an object, objects evaluate to true
1255+
// An array (even an empty one) is an object, objects will evaluate to true
12561256
}
12571257
```
12581258

0 commit comments

Comments
 (0)