-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathcity.html
More file actions
47 lines (33 loc) · 800 Bytes
/
city.html
File metadata and controls
47 lines (33 loc) · 800 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html>
<head>
<title>quiz</title>
<script>
var pennTruthiness = confirm("Are you from Pennsylvania?");
if(pennTruthiness === true) {
//ask what city you're from
var city = prompt("What city are you from?");
//if you are from pittsburgh
if(city === "pittsburgh") {
//awesome
alert("Yinz are good in my book.");
} else if(city === "philly") {
//Ignore them, but with kindness
} else {
//I don't know where that is
}
} else {
var actualState = prompt("What state are you from?");
//say "I have no idea where actualState is...";
}
</script>
<style>
body {
background-color:gainsboro;
}
</style>
</head>
<body>
<h1>Remember to look in the console!</h1>
</body>
</html>