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 sure that i'm using the best way to search in it
thanks alot