The continue statement is fine for normal JavaScript loops, but the jQuery each method requires you to use the return statement instead. Return anything that’s not false and it will behave as a continue. Return false, and it will behave as a break:
$.each(cleanword,function(){
if ( resword == cleanword ){
return true;
}
else if ( filterName.toLowerCase().indexOf(this) != -1 ) {
//...your code...
}
});
For more information, see the jQuery docs.