Hacker News new | past | comments | ask | show | jobs | submit
if("0") {} being equivalent to if(false) {} still gives me nightmares even though I've stopped using PHP for at least 6 years now :)
I knew this in and out, but as a Full-Stack PHP/Symfony/Frontend/JS guy who pivoted to mainly TS for b2b stuff, I still have to occasionally enter

  !""

into the browser console just to be sure, during code reviews :D
loading story #48249396
Also `empty("0") === true` is a common gotcha.