mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 05:27:57 -05:00
Merge pull request #337 from airbnb/clarify-conditionals
[conditionals] clarify conditionals. fixes #336
This commit is contained in:
@@ -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**
|
||||
|
||||
@@ -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**
|
||||
|
||||
Reference in New Issue
Block a user