ECMAScript 6
String.prototype.includes()
console.log("Hello, world!".includes("world")); // true
IE 浏览器或者 ECMAScript 5 以及之前的版本
String.prototype.indexOf()
console.log("Hello, world!".indexOf("world") !== -1); // true