2 ms·
What's so hard for checking for null or undefined? All you need to do is use a condition like `v == null` or `v == undefined`. I like the first one more becaus
by megous 6y ago
What's so hard for checking for null or undefined?
All you need to do is use a condition like `v == null` or `v == undefined`. I like the first one more because it's shorter, but both are equivalent to `v === null || v === undefined`
And you can ignore the distinction then.