mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 20:38:19 -05:00
[conditionals] use if statement
This commit is contained in:
@@ -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**
|
||||
|
||||
Reference in New Issue
Block a user