Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

define array every method in javascript

let array_4 = [50,71,20,29,31,19];

function CheckAdult(value){
    return value >= 18;
}

let array_5 = array_4.every(CheckAdult);
console.log(array_5);
// OUTPUT: true
console.log(typeof(array_5));
// OUTPUT: boolean  
// When we check the type of of that variable in which we use every(), 
// so it will return us boolean data type, 
// because every() returns us true or false after checking if all value of array is satisfied with the condition.
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #define #array #method #javascript
ADD COMMENT
Topic
Name
6+3 =