how to check type of data in javascript\ code example
Example: javascript find type of variable
> typeof "foo"
"string"
> typeof true
"boolean"
> typeof 42
"number"
if(typeof bar === 'number') {
//whatever
}
> typeof "foo"
"string"
> typeof true
"boolean"
> typeof 42
"number"
if(typeof bar === 'number') {
//whatever
}