moving all labs to old dir
This commit is contained in:
11
old/lectures/lec5/p1/task6.js
Normal file
11
old/lectures/lec5/p1/task6.js
Normal file
@@ -0,0 +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