So, I\'m using Jquery and have two arrays both with multiple values and I want to check whether all the values in the first array exist in the second.
You can use this simple function (renamed variables as per above answer for easy reading):
function contains(haystack, needles) { return needles.map(function (needle) { return haystack.indexOf(needle); }).indexOf(-1) == -1; }