javascript check if string contains a text substring

JavaScript
const string = "javascript";
const substring = "script";

console.log(string.includes(substring));  //truevar str = "Hello world, welcome to the universe.";
var n = str.includes("world");stringVariable.includes("Your Text");
Source

Also in JavaScript: