News for hackers. Stuff that matters.
Re:WTFJS? by alunny on Friday February 12, 2010 @06:02PM (#1122067)
it's because of type conversion - null has the same value as 0 (as in `(+ null)`), so it is a number
Re:WTFJS? by jetako on Friday February 12, 2010 @06:14PM (#1122092)
Yea, what a weird mental block, not realizing null is equivalent to 0, even in math statements. I guess it's because null is not the same as 0 when converted to a String.