3 ms·
So transposing a boolean into a boolean is better than transposing a truthy value of an unspecified type into a boolean? You are missing the point, which is it
by wreegab 13y ago
So transposing a boolean into a boolean is better than transposing a truthy value of an unspecified type into a boolean?
You are missing the point, which is it's really silly to transpose a boolean into a boolean using a ternary operator.
If you want to argue that "foo == null" is the problem due implicit nil value falseness, than the solution is simply to use strict comparison operator "===", transposing "foo == null" into a boolean doesn't solve the falseness issue if you think this is what the original author was trying to address.