JavaScript Array every() method
determines whether every element in the array passes the test implemented by the provided function

every() method determines whether every element in the array passes the test implemented by the provided function.

syntax

every(callbackFn) A function to execute for each element in the array ↴

function is called with the following arguments ↴

every(function(element, index, array), thisArg)

callback function allows access to each element, the index, and the original array itself.

thisArg (optional). Value to use as this when executing callbackFn. By default, it is undefined.

every() method returns true if the function returns a truthy value for all elements.

every() method returns false if the function returns a falsy value for one element.

every() method does not execute the function for empty elements.

every() method does not change the original array.

syntax description
determine whether every element in myArray passes test implemented by callback function
myArray.every(callbackFn)