mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-06-05 15:09:09 +09:00
Update calculator.js
This commit is contained in:
@@ -12,7 +12,8 @@ function sum(array) {
|
||||
|
||||
function multiply(array) {
|
||||
return array.length
|
||||
? array.reduce((accumulator, nextItem) => accumulator * nextItem): 0;
|
||||
? array.reduce((accumulator, nextItem) => accumulator * nextItem
|
||||
: 0;
|
||||
}
|
||||
|
||||
function power(a, b) {
|
||||
|
||||
Reference in New Issue
Block a user