I have JavaScript method as below,
function showMsg(id) {
if(id==null && id== undefined)
//doing some task
}
this showMsg(id)
is getting called from different event with id
having some value but onLoad
event its not required any parameter so I am calling this method as below on Onload
event
function onLoading(){
showMsg(null);
}
in Java Script if we have declare a variable and haven't assigned any value to it then it will be undefined.
My question is that is there any situation where if(id==null && id== undefined)
will be false when get called as showMsg(null);
from onLoading()
method.
Will it cause any performance issue,and what are the pros and cons for using this type of check.
Any help suggsetion must be apprecaited Thanks in Advance.