JS includes any string code example
Example 1: if string javascript
if (typeof myVar === 'string') { /* code */ };
Example 2: How find a specific character in js
var word = "This is how you locate a word in a string";
var n = word.includes("word");
Example 3: javascript includes
const pets = ['cat', 'dog', 'bat'];
console.log(pets.includes('cat'));
// output: true