duplicated solutions in loops to match themes
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
function sum() {
|
||||
return arguments.reduce((total, num) => total + num, 0);
|
||||
}
|
||||
|
||||
function sum() {
|
||||
let total = 0;
|
||||
for (let i = 0; i < arguments.length; i++) {
|
||||
total += arguments[i];
|
||||
}
|
||||
return total;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user