SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the _contains function from the underscore.js library to achieve this:
if (_.contains(haystack, needle)) { console.log("Needle found."); };