ArrayEvery()
This function calls a given closure/function with every element in a given array and returns true, if all of the closure calls returns true.
ArrayEvery( array=array, closure=function, parallel=boolean, maxThreads=number );
Returns: Boolean
Examples
Loops over every element in the array
my_array = [ { name = "Frank", age = 40 }, { name = "Sue", age = 21 }, { name = "Jose", age = 54 } ];
all_old = my_array.every(function(person) {
return person.age >= 40;
},true,5);
dump(all_old); // false
See also
- Arrays
- Collections
- Threads
- array.every()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)