if something in string javascript code example
Example 1: if string javascript
if (typeof myVar === 'string') { /* code */ };
Example 2: js check if string contains character
"FooBar".includes("oo"); // true
"FooBar".includes("foo"); // false
"FooBar".includes("oo", 2); // false