javscript check if type is 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