JavaScript Array Methods

Byte sized tutorials on the various prototype methods of JavaScript arrays.
    var scores = [3, 12, 5, 23, 19, 7];
    
    var topScores = scores.filter(function(item){
        if (item > 10){
            return true;
        } else {
            return false;
        }
    });
    
    console.log('topScores: ', topScores);
    var animals = ['dog', 'cat', 'mouse'];
    
    animals.forEach(function(item, i, arr){
        console.log(item);
        console.log(i);
        console.log(arr);
    });
    
    
    var scores = [3, 12, 5, 31, 23, 19, 7];
    
    var reduced = scores.reduce(function(accumulator, item){
        
        console.log('item: ', item);
    
        console.log('accumulator: ', accumulator);
        
        return accumulator + item;
    
    }, 50);
    
    console.log('reduced: ', reduced); 
    function isBigEnough(element) {
        return element >= 15;
    } 
    
    var found = [12, 5, 8].find(isBigEnough);
    
    console.log('found: ', found);
    var a = [2, 90, 9, 18];
    
    var i = a.indexOf(9);
    
    console.log('i: ', i);
    
    
    /*
    if (a.indexOf(7) === -1) {
      // element doesn't exist in array
    }*/
    var numbers = [2, 4, 6, 8];
    
    var doubleNums = numbers.map(function(element) {
        return element * 2;
    });
    
    console.log('doubleNums: ', doubleNums)
    console.log('numbers: ', numbers);
    var ages = [23, 14, 32, 44];
    
    var olderThan18 = ages.every(function(element) {
        return element > 18;
    });
    
    console.log('olderThan18: ', olderThan18);