I want to check if an array contains an array of values rather then a value, for example
var arr = [1, 2, 3];
arr.contains([1, 2]); // returns true
// and
arr.contains([1, 5]); // must be false
There is a method called contains in underscore _.contains but it works like .indexof() in javascript instead it returns true and false and only find a value and not an array
Also there is a method Array.prototype.includes() in javascript that also take single input rather of an array
AND[1,2,3,4].contains([1,4])must returntruewhere as[1,2,3,4].contains([1,9])must return false, hope this makes sense, I'm for now using underscores intersection and second array with intersection result it must be same, its still long procedure....