-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpractice.html
More file actions
33 lines (31 loc) · 1021 Bytes
/
practice.html
File metadata and controls
33 lines (31 loc) · 1021 Bytes
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>practice</title>
</head>
<body>
<script>
/* function switch() {
let a = prompt("enter your age");
switch(a){
case '10': console.log("you are kid");
break;
case '20': console.log("you are pass your teen age");
break;
case '30': console.log("you pass your adulthood");
break;
case '50': console.log("you are your in retirement age ");
break;
default: console.log(".................");
}
}*/
function ternery(){
let b = prompt("enter age");
console.log("you should do " + (b>20 ? "job":"not get job"));
}
ternery();
</script>
</body>
</html>