I know there are two methods to determine if a variable exists and not null(false, empty) in javascript:
1) if ( typeof variableName !== \'undefined\' && v
if ( typeof variableName !== \'undefined\' && v
I found this shorter and much better:
if(varName !== (undefined || null)) { //do something }