-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs3.html
60 lines (58 loc) · 1.66 KB
/
js3.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
60
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta http-equiv="X-UA-Compatible"content="ie-edge">
<title>loops in js</title>
</head>
<body>
<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>
<li>Item-8</li>
</ul>
<script>
// str="this is string1"
// str="this is overwritten string"
// var a='yu'
// {
// let a='y'
// console.log(a)
// }
// const st="use this"
// // st="i am saumya"
// console.log(a)
// console.log(str)
// console.log(st)
let age=32;
if (age>18){
console.log("you can drink cold drinlk")
}
else{
console.log("you can drink water")
}
let cup=4;
cup=44;
switch (cup){
case 3:
console.log('go at gate number 3')
break;
case 42:
console.log('go at gate number 42')
break;
case 44:
console.log('go at gate number 44')
break;
default:
console.log('stay here!')
break;
}
</script>
</body>
</html>