A friend said I should use ! (obj == null)
, because it's better than obj != null
, but he didn't remember why to do this.
Is there any reason for using ! (obj == null)
?
Is there any difference? I mean, both should return true
when the obj
is not null
and neither undefined
, is that right or not? (I am a little confused)
And when the answer is both result to the same, then I would like to know, is that right for all JavaScript versions? (I mean, both work on all browsers or not?)