Created attachment 615406 [details] js-null-bug.png User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0 Build ID: 20120310010316 Steps to reproduce: While debugging an issue in some of my JS code, I found an odd behavior when performing tests on a null value. Apparently null values are not equal to zero, and are not greater than zero, yet somehow ARE greater than or equal to zero. The problem first presented itself in my JS code; I investigated further using Firebug. Actual results: null == 0 (false) null > 0 (false) null >= 0 (true !!!!!!) Expected results: null == 0 (false) null > 0 (false) null >= 0 (false)
Forgot to mention, but this also applies to 'null <= 0'.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.