The title is sort of self-explanatory, I couldn't find a similar question or explanation for this
Asked
Active
Viewed 584 times
0
-
6because `true`, when coerced into a number, is `1`. – VLAZ Aug 13 '19 at 13:53
-
3Also duplicate of https://stackoverflow.com/questions/20555321/javascript-adding-booleans – Aug 13 '19 at 13:54