3 ms·
> the function is very unambiguously written and the language did nothing wrong The language absolutely did something wrong, by trying to evaluate a non-boolea
by bigstrat2003 1y ago
> the function is very unambiguously written and the language did nothing wrong
The language absolutely did something wrong, by trying to evaluate a non-boolean type as a boolean. That is a horrible footgun and JS is absolutely at fault for doing so.