parent
d3412c1423
commit
7b03e764bb
|
@ -10,7 +10,7 @@ function sum(array) {
|
||||||
return array.reduce((current, total) => total + current, 0);
|
return array.reduce((current, total) => total + current, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
function multipy (array) {
|
function multiply (array) {
|
||||||
return array.length
|
return array.length
|
||||||
? array.reduce((accumulator, nextItem) => accumulator * nextItem): 0;
|
? array.reduce((accumulator, nextItem) => accumulator * nextItem): 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue