var x;
if( typeof x === 'undefined' || x === null || x === '' ){
// aqui vem seu código
}
Clique aqui e saiba mais sobre o operador typeof.
var x;
if( typeof x === 'undefined' || x === null || x === '' ){
// aqui vem seu código
}
Clique aqui e saiba mais sobre o operador typeof.