Answers for "js string search"


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

search string javascript

"I love cats".indexOf("cat") //returns 7, the position of "cat"
Posted by: Guest on September-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language