js var.type code example
Example 1: type javascirpt
console.log(typeof 42);
Example 2: javascript check type of variable var
> typeof "foo"
"string"
> typeof true
"boolean"
> typeof 42
"number"
console.log(typeof 42);
> typeof "foo"
"string"
> typeof true
"boolean"
> typeof 42
"number"