Check if variable is 'undefined' or 'null'
to check if javascript variable is undefined or nul use :
if(typeof variable_here === 'undefined'){
// your code here.
};
OR :
if(! variable_here){
// your code here.
};
Comments
Post a Comment