Update Solutions_w02d02_morning_exercise.md

master
Kristyn Bryan 10 years ago
parent a2ac4ab156
commit 7272245b62

@ -107,7 +107,16 @@ arr = [8, 8, 8, 8, 8, 8, 8, 8];
- Return the product of the numbers in `arr`. - 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);
```
... ...

Loading…
Cancel
Save