why (null <= 0) is true?

Frank Quan yuyuenjoy at gmail.com
Mon Sep 24 22:31:43 PDT 2012


null == 0 // false
null > 0 // false
null < 0 // false

null >= 0 // true
null <= 0 // true

The above expressions are weird compared to the all-false "undefined". Why
doesn't the spec treat null like undefined?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120925/48a989f0/attachment.html>


More information about the es-discuss mailing list