File tree Expand file tree Collapse file tree
Lectures/Lecture03/31 March 2026 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+
9+ < script >
10+
11+ // Looping in JavaScript
12+
13+
14+ // start point (initialization)
15+ // condition (termination)
16+ // Output (body)
17+ // Update (increment/decrement)
18+
19+ for ( let i = 0 ; i <= 5 ; i ++ ) {
20+ document . write ( i * 2 + "<br>" ) ;
21+ }
22+
23+ </ script >
24+
25+
26+ </ head >
27+ < body >
28+
29+ </ body >
30+ </ html >
Original file line number Diff line number Diff line change 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+ < style >
8+ li {
9+ color : red;
10+ border : 1px solid black;
11+ width : 50px ;
12+ height : 50px ;
13+ text-align : center;
14+ background-color : lightblue;
15+ float : left;
16+ margin : 10px ;
17+ }
18+ ul {
19+ list-style : none;
20+ }
21+ </ style >
22+
23+ < script >
24+
25+
26+ for ( i = 0 ; i <= 10 ; i ++ ) {
27+ document . write ( "<ul><li>" + i + "</li></ul>" ) ;
28+ }
29+
30+
31+ </ script >
32+
33+
34+ </ head >
35+ < body >
36+
37+
38+
39+
40+ </ body >
41+ </ html >
You can’t perform that action at this time.
0 commit comments