From 36ddb36e21a3e7c62a93e9d0f194973c0578fccb Mon Sep 17 00:00:00 2001 From: Harrison Shoff Date: Thu, 7 May 2015 11:35:42 -0700 Subject: [PATCH 1/3] [conditionals] clarify conditionals. fixes #336 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d8062848..c8398ad8 100644 --- a/README.md +++ b/README.md @@ -1059,7 +1059,7 @@ ## Comparison Operators & Equality - Use `===` and `!==` over `==` and `!=`. - - Comparison operators are evaluated using coercion with the `ToBoolean` method and always follow these simple rules: + - Comparison operators are evaluated in conditional statements using coercion with the `ToBoolean` method and always follow these simple rules: + **Objects** evaluate to **true** + **Undefined** evaluates to **false** From 42958035765aa5cfacef2fdc2cfc92a51e6b704a Mon Sep 17 00:00:00 2001 From: Harrison Shoff Date: Thu, 7 May 2015 11:44:19 -0700 Subject: [PATCH 2/3] [conditionals] use if statement --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c8398ad8..4067a930 100644 --- a/README.md +++ b/README.md @@ -1059,7 +1059,7 @@ ## Comparison Operators & Equality - Use `===` and `!==` over `==` and `!=`. - - Comparison operators are evaluated in conditional statements using coercion with the `ToBoolean` method and always follow these simple rules: + - Comparison operators are evaluated in `if` statements using coercion with the `ToBoolean` method and always follow these simple rules: + **Objects** evaluate to **true** + **Undefined** evaluates to **false** From 871a798a0dc22b9e667fcc291f5f11ee5c87870d Mon Sep 17 00:00:00 2001 From: Harrison Shoff Date: Thu, 7 May 2015 11:58:16 -0700 Subject: [PATCH 3/3] [conditionals] update wording, es5 version --- README.md | 2 +- es5/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4067a930..8a2bd91d 100644 --- a/README.md +++ b/README.md @@ -1059,7 +1059,7 @@ ## Comparison Operators & Equality - Use `===` and `!==` over `==` and `!=`. - - Comparison operators are evaluated in `if` statements using coercion with the `ToBoolean` method and always follow these simple rules: + - Conditional statements such as the `if` statement evaulate their expression using coercion with the `ToBoolean` abstract method and always follow these simple rules: + **Objects** evaluate to **true** + **Undefined** evaluates to **false** diff --git a/es5/README.md b/es5/README.md index 02ecc75e..85fc17db 100644 --- a/es5/README.md +++ b/es5/README.md @@ -572,7 +572,7 @@ ## Comparison Operators & Equality - Use `===` and `!==` over `==` and `!=`. - - Comparison operators are evaluated using coercion with the `ToBoolean` method and always follow these simple rules: + - Conditional statements such as the `if` statement evaulate their expression using coercion with the `ToBoolean` abstract method and always follow these simple rules: + **Objects** evaluate to **true** + **Undefined** evaluates to **false**