Hacker News new | past | comments | ask | show | jobs | submit login

It's hilarious, because:

  "1" + 1 === "11"
  "1" - 1 === 0
  "1" + 1n === "11"
  "1" - 1n: Exception



Our testers write a lot scripts in PHP and I have spent countless hours debugging stuff like this. A special kind of fun is to figure out what expressions count as TRUE or FALSE. JavaScript seems to have the same, slightly different, problems.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: