Skip to content

Commit e4a1148

Browse files
authored
Merge pull request #866 from mb1047/patch-1
Update article.md
2 parents 706b1f2 + e42e8d9 commit e4a1148

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/02-first-steps/08-comparison/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ alert( null == 0 ); // (2) false
172172
alert( null >= 0 ); // (3) *!*true*/!*
173173
```
174174

175-
Mathematically, that's strange. The last result states that "`null` is greater than or equal to zero", so one of the comparisons above it must be correct, but they are both false.
175+
Mathematically, that's strange. The last result states that "`null` is greater than or equal to zero", so in one of the comparisons above it must be `true`, but they are both false.
176176

177177
The reason is that an equality check `==` and comparisons `> < >= <=` work differently. Comparisons convert `null` to a number, treating it as `0`. That's why (3) `null >= 0` is true and (1) `null > 0` is false.
178178

0 commit comments

Comments
 (0)