From 9498b3f7c485f56aa22549b95428aea5d2aa53fd Mon Sep 17 00:00:00 2001 From: Peter Geiss Date: Wed, 13 Jan 2016 23:12:06 -0500 Subject: [PATCH] Clearly show that [] is truthy --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e7b3e37227..b465162e05 100644 --- a/README.md +++ b/README.md @@ -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 } ```