// use the variable.includes() const myString = "hello world!" if(myString.includes("hello")){ // do something }else{ //also do something }