-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSpindler_Exercise1.html
30 lines (29 loc) · 1.13 KB
/
Spindler_Exercise1.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
<!DOCTYPE html>
<html>
<head>
<title>Mad Lib #1</title>
</head>
<body>
<div id="output"></div>
<script>
var properNameOne = prompt("Enter a proper name");
var properNameTwo = prompt("Enter a second proper name")
var verb = prompt("Enter a verb (past tense)");
var verb2 = prompt("Enter a second verb (past tense)");
var verb3 = prompt("Enter a third verb");
var adj = prompt("Enter an adjective");
var adj2 = prompt("Enter another adjective");
var adj3 = prompt("Enter one more adjective")
var out = "Roses are Red. Violets are blue. <br/>"
out += properNameOne + " left town without wearing a shoe.<br/>";
out += properNameTwo + " also left the town, but he did wear a shoe.<br/>"
out += properNameOne + ' ' + verb;
out += " and " + properNameOne + ' ' + verb2;
out += " and also " + properNameTwo + ' ' + verb3+'.<br/>';
out += " But I am " + adj + ' ' + properNameOne + " thought.<br/> ";
out += "But I am also " + adj2 + ' ' + properNameTwo + " thought. <br/>";
out += "And kind of " + adj3 + " too!";
document.getElementById("output").innerHTML = out;
</script>
</body>
</html>