Skip to content

Commit 239dcac

Browse files
committed
add: do while
1 parent 2b13090 commit 239dcac

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
function whileLoop(num){
2+
while(num < 10){
3+
console.log(num);
4+
num++;
5+
}
6+
}
7+
8+
function doLoop(num){
9+
do{
10+
console.log(num);
11+
num++;
12+
}while(num < 10);
13+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Learning JavaScript - Walker</title>
6+
<link rel="stylesheet" href="style.css">
7+
</head>
8+
<body>
9+
<h1>While - Do While</h1>
10+
<script src="app.js"></script>
11+
</body>
12+
</html>

01-Basics/04-loop-doWhile/style.css

Whitespace-only changes.

0 commit comments

Comments
 (0)