This is my code. i want to check the input value with the array as prefixes and user must enter this any one array value as prefixes with its own value. js:
var per =["00162", "001187", "00188e", "002163", "002491"];
var isValid = false;
$.each(per , function(index,value) {
var i = [index];
console.log(i);
});
for(var j=0; j<i; j++) {
if(per[j] === value) {
isValid = true;
}
}