Contains Substring in JavaScript

Posted by yhuang
Public (Editable by Users)
JavaScript
None
Edit
var str = "Hello world, welcome to the universe.";
console.log(str.includes("world"));
console.log(str.includes("pig"));