2 ms·
The problem there isn't with coercion, it's with + being both addition and concatenation, as I mentioned at the end of my comment. If you use any other operato
by tikhonj 15y ago
The problem there isn't with coercion, it's with + being both addition and concatenation, as I mentioned at the end of my comment.
If you use any other operator (any reasonable operator), it works: "1" - 1 === 0, "1" - "1" === 0 and 1 - 1 === 0.