diff --git a/unit_01/w02d02/morning_exercise/Solutions_w02d02_morning_exercise.md b/unit_01/w02d02/morning_exercise/Solutions_w02d02_morning_exercise.md index 3fd0947..7b263b1 100644 --- a/unit_01/w02d02/morning_exercise/Solutions_w02d02_morning_exercise.md +++ b/unit_01/w02d02/morning_exercise/Solutions_w02d02_morning_exercise.md @@ -107,7 +107,16 @@ arr = [8, 8, 8, 8, 8, 8, 8, 8]; - Return the product of the numbers in `arr`. +SOLUTION .reduce +```javascript +arr = [8, 8, 8, 8, 8, 8, 8, 8]; +new_value = arr.reduce(function(product, n){ + return product *= n +}); + +console.log(new_value); +``` ...