JavaScript Check Tipo de variável var
> typeof "foo"
"string"
> typeof true
"boolean"
> typeof 42
"number"
Valentino_Rossi
> typeof "foo"
"string"
> typeof true
"boolean"
> typeof 42
"number"
if(typeof variable == 'object'){
//
}