Sorry for what I'm sure had have been asked in the past, but it's very hard to search for a question like this. "!=" and "!==" are not exactly search friendly. If anyone knows a duplicate question you can point me to it.
What is the difference between doing myVar != null
and myVar !== null
?
I know that !=
is not equal
and !==
is not equal value or not equal type
, but when comparing to null is there ever a case where they would return different results? Is one better to use than the other?