Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array.every()

<script>
  
// JavaScript code for every() function 
function isodd(element, index, array) {  
    return (element % 2 == 1);  
} 
    
function geeks() { 
    var arr = [ 6, 1, 8, 32, 35 ]; 
      
    // check for odd number 
    var value = arr.every(isodd); 
    console.log(value); 
} 
geeks(); 
</script>
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
5+5 =