I need a javascript function that can take in a string and an array, and return true if that string is in the array..
function inArray(str, arr){ ... }
Something like this?
function in_array(needle, haystack) { for(var key in haystack) { if(needle === haystack[key]) { return true; } } return false; }