-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSwitch Statement in Javascript.html
More file actions
39 lines (36 loc) · 1.08 KB
/
Switch Statement in Javascript.html
File metadata and controls
39 lines (36 loc) · 1.08 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Switch Statement</title>
</head>
<body>
<script>
var day = 5;
switch(day){
case 1:
document.write("sun");
break;
case 2:
document.write("Mon");
break;
case 3:
document.write("Tue");
break;
case 4:
document.write("web");
break;
case 5:
document.write("Thu");
break;
case 6:
document.write("fri");
break;
case 7:
document.write("sat");
break;
}
</script>
</body>
</html>