javascript check for string type 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