2 ms·
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
by jacobolus 8y ago
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).