indexOf Starting Position

indexOf Starting Position

email_given = "[email protected]";
search_string = "resource-centre.net";
if(email_given.indexOf(search_string,12)>-1){
 alert(search_string + ' has been found');
}
else{
 alert('Search Returned No Results');
}
Comments are closed.