-
Notifications
You must be signed in to change notification settings - Fork 0
/
tut51.html
59 lines (55 loc) · 1.48 KB
/
tut51.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
53
54
55
56
57
58
59
<!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>Conditional and scope</title>
</head>
<body>
<div>
<ul>
<li>Item-1</li>
<li>Item-2</li>
<li>Item-3</li>
<li>Item-4</li>
<li>Item-5</li>
<li>Item-6</li>
<li>Item-7</li>
</ul>
</div>
<script>
// let a="u";
// {
// let a="u6";
// console.log(a);
// }
// console.log(a);
// const a ="This can not be changed ";
// the constant is used so that we can not changed the value
//
// let age=24;
// if(age>18){
// console.log("You can have a sex")
// }
// else{
// console.log("You can not have a sex")
// }
const cups = 5;
switch (cups) {
case 4:
console.log("The value of cups is 4")
break;
case 5:
console.log("The value of cups is 5")
break;
case 7:
console.log("The value of cups is 7")
break;
default:
console.log("The value of cups is none of these")
break;
}
</script>
</body>
</html>