Answers for "find word in string javascript"

4

js string search

var str = "This is a test sentence";
var hasTest = str.includes("test");

if(hasTest == true){
	//do a thing 
}
Posted by: Guest on November-19-2020

Code answers related to "find word in string javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language