JavaScript Compruebe si está indefenso

if (typeof myVariable === 'undefined'){
    //myVariable is undefined
}
Grepper