4 ms·
It might be technically correct, but if the intention was a loose comparison surely don't include null in the comparison? return !foo ? null : foo;
by surreal 13y ago
It might be technically correct, but if the intention was a loose comparison surely don't include null in the comparison?
return !foo ? null : foo;
- surreal 13y ago... or return foo || null; if you're into that sort of thing