const string = "foo"; const substring = "oo"; console.log(string.includes(substring));
var string = "foo"; var substring = "oo"; console.log(string.indexOf(substring) !== -1);