ts if string is in type code example
Example 1: js check if variable is string
if (typeof myVar === 'integer'){
//I am indeed an integer
}
if (typeof myVar === 'boolean'){
//I am indeed a boolean
}
Example 2: display true if the parameter is type string
if (typeof myVar === 'string' || myVar instanceof String)
// it's a string
else
// it's something else