how to check if there are multiple of one element in an array javascript code example
Example 1: array contains multiple js
var containsAll = arr1.every(i => arr2.includes(i));
Example 2: javascript check if elements of one array are in another
const found = arr1.some(r=> arr2.includes(r))
Example 3: check if array has same values javascript
const allEqual = arr => arr.every(v => v === arr[0]);
allEqual([1,1,1,1]); // true