Clearly show that [] is truthy

This commit is contained in:
Peter Geiss
2016-01-13 23:12:06 -05:00
parent 397f5bbd14
commit 9498b3f7c4

View File

@@ -1250,9 +1250,9 @@ Other Style Guides
+ **Strings** evaluate to **false** if an empty string `''`, otherwise **true**
```javascript
if ([0]) {
if ([0] && []) {
// true
// An array is an object, objects evaluate to true
// An array (even an empty one) is an object, objects will evaluate to true
}
```