Merge pull request #337 from airbnb/clarify-conditionals

[conditionals] clarify conditionals. fixes #336
This commit is contained in:
Harrison Shoff
2015-05-07 12:15:00 -07:00
2 changed files with 2 additions and 2 deletions

View File

@@ -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:
- 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**

View File

@@ -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**