LU07.A05 - Mood measurement, realized with methods

Prerequisites

Source

Assignments

Realize the assignment LU07.A05 - Events - Mood measuremen by using methods:

  1. Display a heading: Choose Your Mood.
  2. Add three buttons, each representing a different mood, e.g:
    • 😊 Happy
    • 😢 Sad
    • 😠 Angry
    • 😢 Desperate
    • 😕 Confused
    • 😅 Glad
  3. Use the v-on directive to update a data property called mood based on the button clicked.
  4. Display a custom message below the buttons that changes based on the selected mood.
  5. When no mood is selected, show a default message prompting the user to pick one.

Hint

  1. When clicking a button, just pass a number to the method with the messages.
  2. In that methods a if (selction) checks the content of the argument and displays the corresponding message.

Solution

Lösung

Vocabulary

English German

Volkan Demir