How can i find matching element in array, for example
i want to find word in array element "Black"
Array element is : ["Black footbal scarf"]
So i understand how to match this by converting array to string, but how can i do it exactly with array elements
var color = "Black";
var arr = ["Black footbal scarf", "Blue footbal scar", "Red footbal scar"];
//Converting to string WORKS
alert(arr.join("").indexOf(color));
alert(arr.indexOf(color));
So i need to get array index of the color from variable.