Skip to content

Commit 8d9507d

Browse files
committed
arguments
1 parent d28323e commit 8d9507d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

arguments.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
function result(num1,num2){
22
// console.log(arguments[1]);
3-
for(num of arguments){
4-
console.log(num);
3+
let sum=[0];
4+
for(let num of arguments){
5+
sum =sum + num;
56
}
6-
// let sum=[0];
7-
// sum = num1 + num2;
8-
// return sum;
7+
8+
return sum;
99
}
1010

1111
console.log(result(33,22,10));

0 commit comments

Comments
 (0)