string contains in javascript

JavaScript
var string = "foo",
    substring = "oo";

console.log(string.includes(substring));const string = "javascript";
const substring = "script";

console.log(string.includes(substring));  //truevar str = "Hello world, welcome to the universe.";
var n = str.includes("world");'Blue Whale'.includes('blue')  // returns false
const string = "foo";
const substring = "oo";

console.log(string.includes(substring));'Bandeira do Brasil'.includes('brasil'); // retorna false
Source

Also in JavaScript: