j = rulesToRemove.length;
arrayOrigin.splice(i-1, 1);
break;

is it ok? we can delete the match var in that case