The .every method tests if all array elements pass a provided predicate test.
To test all objects for equality, you can use the following code snippets.
[1, 2, 1].every(function(item, i, list) { return item === list[0]; }); // false
[1, 1, 1].every(function(item, i, list) { return item === list[0...