From 2337d80b481664f6f01a60431490570a3bfb6db1 Mon Sep 17 00:00:00 2001 From: Carlos Mateo Date: Fri, 8 Nov 2019 10:02:14 +0100 Subject: [PATCH] Iteratio #3 completed --- starter-code/src/functions-and-arrays.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/starter-code/src/functions-and-arrays.js b/starter-code/src/functions-and-arrays.js index 1a445962b..feb30d92f 100644 --- a/starter-code/src/functions-and-arrays.js +++ b/starter-code/src/functions-and-arrays.js @@ -27,6 +27,10 @@ findLongestWord(words); const numbers = [6, 12, 1, 18, 13, 16, 2, 1, 8, 10]; +numbers.reduce(function (a, b) { + return a + b; +}); + // Iteration #4: Calculate the average // Level 1: Array of numbers const numbersAvg = [2, 6, 9, 10, 7, 4, 1, 9];