array method for all code example
Example 1: js every
const exams = [80, 98, 92, 78, 77, 90, 89, 84, 81, 77]
exams.every(score => score >= 75) // Say true if all exam components are greater or equal than 75
Example 2: javaascript all
function isBigEnough(element, index, array) {
return element >= 10;
}
[12, 5, 8, 130, 44].every(isBigEnough);