var str = "Hello world, welcome to the universe."; var n = str.includes("world");
var str = "This is a test sentence"; var hasTest = str.includes("test"); if(hasTest == true){ //do a thing }
var str = "Visit W3Schools!"; var n = str.search("W3Schools");