I have an array of values with names:
names = ['Jim', 'Jack', 'Fred']
I have also received a value from a function, which is a name in string form, such as:
returnedValue = 'Jim'
How can I run the returnedValue string against the values of the names array and test for a match?
My feeling is that you would want to use the .filter method of the array prototype but I can't conceive of how to do it that way.