Final Project: Emoji Mood Selector

Emoji mood selector

  1. Add three buttons labeled โ€œHappy ๐Ÿ˜€,โ€ โ€œNeutral ๐Ÿ˜,โ€ and โ€œSad ๐Ÿ˜žโ€.

  2. 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

  1. Add three buttons labeled โ€œHappy ๐Ÿ˜€,โ€ โ€œNeutral ๐Ÿ˜,โ€ and โ€œSad ๐Ÿ˜žโ€.

  2. 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.