javascript if array contains value of another array code example
Example 1: check if array has same values javascript
const allEqual = arr => arr.every(v => v === arr[0]);
allEqual([1,1,1,1]); // true
Example 2: array contains multiple js
var containsAll = arr1.every(i => arr2.includes(i));