check all possible types from str js code example
Example: js check if variable is string
if (typeof myVar === 'integer'){
//I am indeed an integer
}
if (typeof myVar === 'boolean'){
//I am indeed a boolean
}
if (typeof myVar === 'integer'){
//I am indeed an integer
}
if (typeof myVar === 'boolean'){
//I am indeed a boolean
}