check if a string is included in a word javascript code example
Example 1: if string javascript
if (typeof myVar === 'string') { /* code */ };
Example 2: javascript string contains function
s = "Hello world";
console.log(s.includes("world"));
if (typeof myVar === 'string') { /* code */ };
s = "Hello world";
console.log(s.includes("world"));