8000 cleaned code · turnera/javascript-exercises@fe7f096 · GitHub
[go: up one dir, main page]

Skip to content

Commit fe7f096

Browse files
author
turnera
committed
cleaned code
1 parent 0d2ae18 commit fe7f096

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

calculator/calculator.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,17 @@ function subtract (x, y) {
99
function sum (x) {
1010
let sum = 0;
1111
for(let i = 0; i< x.length; i++)
12-
{
1312
sum += x[i];
14-
}
13+
1514
return sum;
1615
}
1716

1817
function multiply(x)
1918
{
2019
let result = 1;
2120
for(let i = 0; i < x.length; i++)
22-
{
2321
result *= x[i];
24-
}
22+
2523
return result;
2624
}
2725

0 commit comments

Comments
 (0)
0