Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
With js you really are better off comparing that kinda stuff with what you think it should be rather that testing that it's just not undefined. Effectively you're half enforcing typing instead of checking definededness if that's a word
-
null == undefined (they are equivalent)
null === undefined (they are not exactly the same thing)
Related Rants
Hard to believe some "experimented" js developers does not know this difference
undefined
==
===
equality
js
identity
null