Re:JavaScript Coercions Grid
by jacobolus on Saturday March 30, 2019 @02:59PM
(#19531101)
Turning +true into 1 and +false into 0 does not seem surprising or problematical. To me this seems like the obviously only correct behavior. Turning these into NaN would be a giant terrible WTF for me.
The author might want to add !!foo as an additional type of coercion (to bool).
The author might want to add !!foo as an additional type of coercion (to bool).