3 ms·
>I'd much prefer a length check than truthiness check if I wanted to test for empty strings - that way if any nulls or undefineds come through, they would show
by rhapsodic 8y ago
>I'd much prefer a length check than truthiness check if I wanted to test for empty strings - that way if any nulls or undefineds come through, they would show up as errors.
That may well be the best approach in some circumstances. But do you think I'm being unreasonable wanting to hire only someone who knows those very fundamental aspects of the Javascript language?
- L0stLink 8y agoI don't think it is unreasonable at all. Also the code evaluates to 'nerd' that person was probably just being cheeky.