i trying to match my string with given array of string but this below code is not working,is any suggestion might be help , below code is what i have tried
le
var Arrayvalue = ["a","b","c"];
var matchstring = "v";
if (Arrayvalue .indexOf(matchstring) > -1) {
// if it is matches the array it comes to this condition
} else {
// if it is matches the array it comes to this condition
}
The indexOf() method searches the your array for the specified item, and returns its position.