Skip to content

Commit 9f548c7

Browse files
committed
fix: doWhile
1 parent 9b47ac3 commit 9f548c7

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • 01-Basics/04-loop-doWhile

01-Basics/04-loop-doWhile/app.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
function whileLoop(num){
2-
while(num < 10){
2+
while(num < 11){
33
console.log(num);
4-
num++;
4+
num++; // num = num + 1;
55
}
66
}
77

88
function doLoop(num){
99
do{
1010
console.log(num);
1111
num++;
12-
}while(num < 10);
13-
}
12+
}while(num < 11);

0 commit comments

Comments
 (0)