javascript if statement for checking type of string code example
Example: check type string javascript
if (typeof myVar === 'string' || myVar instanceof String)
// it's a string
else
// it's something else
if (typeof myVar === 'string' || myVar instanceof String)
// it's a string
else
// it's something else