// words = ["Ho", "Chi", "Minh", "City", "was", "once", "known", "as", "Prey", "Nokor"]; // // words.forEach(function (each_word){ // console.log(each_word.toUpperCase()); // }); ///////////////////// // more_words = ["Joe", "Overreats", "Eggs"]; // // // var new_arr = more_words.map(function (i){ // return i.charAt(0); // }); // // console.log (new_arr); /////////////////// // arr = [8, 8, 8, 8, 8, 8, 8, 8]; // // new_value = arr.reduce(function(product, n){ // return product *= n // }); // // console.log(new_value); ///////////////////// // // var sheepShearers = [ // { // name: "Tim", // age: 20, // sheepCount: 18 // }, // { // name: "C3PO", // age: 200, // sheepCount: 320 // }, // { // name: "Cousin It", // age: Infinity, // sheepCount: 2900 // } // ]; // // var total = sheepShearers.map(function(e){return e.sheepCount}); // .reduce(function(sum, num) {return sum += num;}); // // console.log (total);