Does anyone know why would this happen for below code
if(myVarible !=undefined){ myVarible.doSomething() }
myVariable is A global object that is used only on some pages I am sure I've done this in a past and it always worked. I also tried
if(!!s){}
Which I am also sure I've used in the past.
finally got it to work with if(typeof s!=="undefined"){}
but I would like to know why undefined variable is not equal to undefined
and why did it work in the past?
Thanks