is there any way to make my jquery search better ?
- by From.ME.to.YOU
Hello
var myarr= Array('test1','test2','test3');
var searchTerm = "test";
var rSearchTerm = new RegExp( searchTerm,'i');
$.each(myarr, function(i) {
if (myarr[i].match(rSearchTerm)) {
//item found
}
});?
guys is there any way to make my search algorithm better ? "myarr" will be a big array so i want to make…