check if string in js code example
Example 1: if string javascript
if (typeof myVar === 'string') { /* code */ };
Example 2: js test if string
if (typeof string === 'string') { /* code */ };
if (typeof myVar === 'string') { /* code */ };
if (typeof string === 'string') { /* code */ };