forked from itscodenation/int-u3l1-23-24-student-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfairyTale.js
49 lines (31 loc) · 2.35 KB
/
fairyTale.js
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
// 1. Create a variable named `place` and set the value to a string that says whatever place you want.
// 2. Create a variable named `creatureName` and set the value to a string that says whatever name you want to give the creature.
// 3. Create a variable named `color` and set the value to a string that says whatever color you want.
// 4. Create a variable named `color2` and set the value to a string that says a different color you want.
// 5. Create a variable named `emotion` and set the value to a string that says whatever emotion you want.
// 6. Create a variable named `character` and set the value to a string that says whatever name for a character you want.
// 7. Create a variable named `number` and set the value to a number greater than 1.
// 8. Create a variable named `item` and set the value to a string that says whatever item/thing you want.
// 9. Create a variable named `item2` and set the value to a string that says a different item/thing you want.
// 10. Create a variable named `verb` and set the value to a string that says whatever verb you want.
// 11. Create a variable named `adverb` and set the value to a string that says whatever adverb you want.
// 12. Create a variable named `number2` and set the value to a number greater than 1.
// 14. Replace the null values with the appropriate variable you created above.
// - Afterwards, run your code and press the button to see your story ✨
document.querySelector("button").addEventListener("click", function() {
document.querySelector(".place").innerHTML = null;
document.querySelector(".creature-name").innerHTML = null;
document.querySelector(".color").innerHTML = null;
document.querySelector(".color-2").innerHTML = null;
document.querySelector(".emotion").innerHTML = null;
document.querySelector(".character").innerHTML = null;
document.querySelector(".creature-name-again").innerHTML = null;
document.querySelector(".number").innerHTML = null;
document.querySelector(".item").innerHTML = null;
document.querySelector(".character-again").innerHTML = null;
document.querySelector(".item-2").innerHTML = null;
document.querySelector(".verb").innerHTML = null;
document.querySelector(".adverb").innerHTML = null;
document.querySelector(".number-2").innerHTML = null;
document.querySelector(".story-container").style = "display:block";
});