Skip to content

Commit dc85c50

Browse files
committed
Add Example01 and Example02 HTML files for break and continue tutorial
1 parent b5de05b commit dc85c50

3 files changed

Lines changed: 67 additions & 0 deletions

File tree

.DS_Store

6 KB
Binary file not shown.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Document</title>
7+
8+
<script>
9+
10+
// print list
11+
//for (let i = 0; i <= 20; i++) {
12+
// if (i == 10) {
13+
// break;
14+
// }
15+
// document.write(i,"<hr>")
16+
//}
17+
18+
// print list
19+
for (let i = 0; i <= 20; i++) {
20+
if (i == 10) {
21+
continue;
22+
}
23+
document.write(i,"<hr>")
24+
}
25+
26+
27+
</script>
28+
29+
30+
</head>
31+
<body>
32+
33+
34+
35+
36+
37+
</body>
38+
</html>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Document</title>
7+
8+
<script>
9+
10+
start = document.getElementById("start");
11+
end = document.getElementById("end");
12+
13+
</script>
14+
15+
16+
</head>
17+
<body>
18+
19+
20+
start <input type="text" id="start">
21+
end <input type="text" id="end">
22+
23+
<button>Stop</button>
24+
<button>Start</button>
25+
26+
27+
28+
</body>
29+
</html>

0 commit comments

Comments
 (0)