We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80f7881 commit 175ee76Copy full SHA for 175ee76
08_calculator/solution/calculator-solution.js
@@ -11,12 +11,12 @@ const sum = function (array) {
11
};
12
13
const multiply = function(...args){
14
- let sum = 1
15
- for (let i = 0; i < args.length; i++) {
16
- sum *= args[i]
17
- }
18
- return sum
19
+ let product = 1;
+ for (let i = 0; i < args.length; i++) {
+ product *= args[i];
+ }
+ return product;
+ };
20
21
const power = function (a, b) {
22
return Math.pow(a, b);
0 commit comments