string check javascript

JavaScript
if (typeof myVar === 'string') { /* code */ };if (typeof string === 'string') { /* code */ };"FooBar".includes("oo"); // true

"FooBar".includes("foo"); // false

"FooBar".includes("oo", 2); // falseif (your_string.indexOf('hello') > -1)
{
  alert("hello found inside your_string");
}
Source

Also in JavaScript: