Except strict equality, that’s a JavaScript only problem. Imagine thinking "0"
should be falsy in comparison due to string literal evaluation, but truthy with logical not applied based on non-empty string. Thus !"0"=="0"
is true. They couldn’t just throw away ==
and start over nooooo let’s add ===
. Utter madness
Lua does intrinsic evaluation of strings that i’d argue is not nearly as crazy. I get the value of it since half of interpreted languages it just churning through strings. But I also don’t recommend any large codebase ever use JS’s == or string coercion because it can go against expectations. This graph argues in JS’s favor but comparison is a little more crazy https://algassert.com/visualization/2014/03/27/Better-JS-Equality-Table.html