-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswitch-statement.html
52 lines (43 loc) · 909 Bytes
/
switch-statement.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
44
45
46
47
48
49
50
51
52
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
let y = prompt("Enter the value of y ");
let n;
n=y;
switch(n)
{
case 1:
console.log("Monday");
break;
case 2:
console.log("Tuesday");
break;
case 3:
console.log("Wednesday");
break;
case 4:
console.log("Thursday");
break;
case 5:
console.log("Friday");
break;
case 6:
console.log("Saturday");
break;
case 7:nconsole.log("Holiday");
case "Quaid-Day":
console.log("Great Muslim Leader");
break;
default:
console.log("Invalid choice");
}
</script>
</body>
</html>