We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8049c08 commit 51f5114Copy full SHA for 51f5114
Solutions/3-while.js
@@ -3,7 +3,7 @@
3
const sum = (...args) => {
4
let value = 0;
5
while (args.length > 0) {
6
- value += args.shift();
+ value += args.pop();
7
}
8
return value;
9
};
Solutions/4-do-while.js
@@ -4,7 +4,7 @@ const sum = (...args) => {
if (args.length === 0) return 0;
do {
} while (args.length > 0);
10
0 commit comments