-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhello.html
43 lines (39 loc) · 835 Bytes
/
hello.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hello</title>
<script>
function greet() {
//One-line comment
/*Multiline*/
//Defining variables
let x = 5;
let counter = 0;
counter += 1;
//Conditions
if (x < y) {
alert("x<y")
} else if (x > y) {
alert("x<y")
} else {
alert("x>y")
}
//Loops
while (true)
{
}
for (let i=0; i<10; i++)
{
}
alert("Hello, world!");
}
</script>
</head>
<body>
<form onsubmit="greet(); return false;">
<input type="text">
<input type="submit">
</form>
</body>
</html>