check if a var is a string javascript 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
}