Y
Hacker News
new
|
ask
|
show
|
jobs
by
joelbirchler
4422 days ago
The + operation is evaluated first, and + coerces nulls to zeros. This looks like:
(null + null) === 0
(0) === 0
true
1 comments
swozniak
4421 days ago
Ah, it looks like JavaScript coerces null to the type against which it is being compared.
Thanks!
link
Thanks!