Yesterday I came across a situation in my project which demands whether a js variable exists or not.The following is the solution for that.
if(typeof varName != ‘undefined’){
alert(“variable exists”);
}
Yesterday I came across a situation in my project which demands whether a js variable exists or not.The following is the solution for that.
if(typeof varName != ‘undefined’){
alert(“variable exists”);
}