how to check if value is a string code example
Example 1: if string javascript
if (typeof myVar === 'string') { /* code */ };
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