7 ms·
The + operation is evaluated first, and + coerces nulls to zeros. This looks like: (null + null) === 0 (0) === 0 true
by joelbirchler 12y ago
The + operation is evaluated first, and + coerces nulls to zeros. This looks like:
(null + null) === 0
(0) === 0
true
- swozniak 12y agoAh, it looks like JavaScript coerces null to the type against which it is being compared. Thanks!