Final Project: Emoji Mood Selector
Emoji mood selector
Add three buttons labeled โHappy ๐,โ โNeutral ๐,โ and โSad ๐โ.
When the user clicks a button, update a
<p>tag (id="mood-display") to show the selected mood emoji.
Below are some hints to help you get started:
Hints:
1๏ธโฃ What should change when a button is clicked?โ The mood emoji inside <p id="mood-display"> should update.
2๏ธโฃ How do we listen for a button click?โ Use addEventListener("click", function() {...}) on each button.
3๏ธโฃ How do we update text inside an element?โ Use .textContent to modify whatโs inside moodDisplay.
Write your code in the widget below:
Good job with this challenge!
If you need further help solving it, see the next lesson for the solution.
Final Project: Emoji Mood Selector
Emoji mood selector
Add three buttons labeled โHappy ๐,โ โNeutral ๐,โ and โSad ๐โ.
When the user clicks a button, update a
<p>tag (id="mood-display") to show the selected mood emoji.
Below are some hints to help you get started:
Hints:
1๏ธโฃ What should change when a button is clicked?โ The mood emoji inside <p id="mood-display"> should update.
2๏ธโฃ How do we listen for a button click?โ Use addEventListener("click", function() {...}) on each button.
3๏ธโฃ How do we update text inside an element?โ Use .textContent to modify whatโs inside moodDisplay.
Write your code in the widget below:
Good job with this challenge!
If you need further help solving it, see the next lesson for the solution.