Corrected incomplete sentence in "Comparisons" page
This commit is contained in:
parent
62226efedc
commit
b536ce1eb8
1 changed files with 1 additions and 1 deletions
|
@ -176,7 +176,7 @@ Yeah, mathematically that's strange. The last result states that "`null` is grea
|
|||
|
||||
The reason is that an equality check `==` and comparisons `> < >= <=` work differently. Comparisons convert `null` to a number, hence treat it as `0`. That's why (3) `null >= 0` is true and (1) `null > 0` is false.
|
||||
|
||||
On the other hand, the equality check `==` for `undefined` and `null` works by the rule, without any conversions. They equal each other and don't equal anything else. That's why (2) `null == 0` is false.
|
||||
On the other hand, the equality check `==` for `undefined` and `null` is defined such that, without any conversions, they equal each other and don't equal anything else. That's why (2) `null == 0` is false.
|
||||
|
||||
### An incomparable undefined
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue