3 ms·
Say what you want about PHP, but here we are decades later. I'm still using it, it still works, and it's still getting updated and improved.
by jdjdjrj 5y ago
Say what you want about PHP, but here we are decades later. I'm still using it, it still works, and it's still getting updated and improved.
- 0x4d464d48 5y agoSay what you will about JavaScript... I use it constantly not because it's well-designed but because TINA (there is no alternative). [] == ![]; // true. Go ahead. Run it in your console...
- stefanos82 5y ago...so it basically is `0 == ![]`, in other words, `[].length` which is `0`, thus becomes `0 == false` which returns `true` with loose comparison?
- 0x4d464d48 5y agoYep. Because an array is an object which has a 'truthy' value '![]' evaluates as 'false'. Simplifies to a statement similar to 'false == false'. A little useless arcana for those interested. Well, not so useless if your expecting '!someEmptyArray' to evaluate to 'true'. Use '!someEmptyArray.length' instead.
- npteljes 5y agoWhat is this argument for, or against?