This question already has an answer here:
- array.contains(obj) in JavaScript 30 answers
I have a string array and one string. I'd like to test this string against the array values and apply a condition the result - if the array contains the string do "A", else do "B".
How can I do that?