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

Oh JavaScript. Will a Boolean always on all browsers coerce itself into a 0 or 1 if treated like a number?



The Javascript coercion rules, arcane as they are, are actually part of the spec and (barring any bugs) should work across browsers.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: