-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest5.html
64 lines (59 loc) · 1.74 KB
/
test5.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
61
62
63
64
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>JavaScript Assignment 5</title>
<link rel="shortcut icon" href="javascript-logo.png" type="image/x-icon" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="nav">
<a href="index.html"><button>First Assignment</button></a>
<a href="test2.html"><button>Second Assignment</button></a>
<a href="test3.html"><button>Third Assignment</button></a>
<a href="test4.html"><button>Fourth Assignment</button></a>
<a href="test5.html"><button>Fifth Assignment</button></a>
</div>
<script>
let city = prompt("Enter Your City like Karachi");
if (city == "karachi") {
alert("Welcome To city of lights");
} else {
alert("Welcome To Pakistan Most Beautiful city");
}
let male = prompt("Enter Your Gender");
if (male == "male") {
alert("Hello Sir");
} else if ((male = "female")) {
alert("Hello Ma'am");
}
let num = prompt("10 + 20 kitne hote hyn");
if (num == "30") {
alert("Correct");
} else {
alert("Wrong");
}
let num2 = prompt("55 + 25 kitne hote hyn");
if (num2 == "80") {
alert("Correct");
} else {
alert("Wrong");
}
let flag = prompt(
"What color is the flag of Pakistan Green, Yello, Red, Blue"
);
if (flag == "green") {
alert("Correct");
} else {
alert("Wrong");
}
let day = prompt("aaj kiya din hy");
if (day == "friday") {
alert("Correct");
} else {
alert("Wrong");
}
</script>
</body>
</html>