LU07.A04 - Methods with arguments - Animal-count

  • Work type: Individual
  • Means of aid: only teaching materials, no websearch, no use of ai.
  • Timeframe: 30 Minutes
  • Expected result: A Vue-Script, that calculates how often the animals were clicked.
  1. Implementing VUE methods by using arguments.
  2. Increment and decrement a counter within a method.
  3. Writing own methods and making use of them.
  • A01: Test the code example above which was provided to you. Describe the behaviour of the script using HTML comments.
  • A02: Check to basic function of the script. When clicking the number-buttons below the animal-images the animal count count up or down.
  • A03: Make sure that you have the title <h1> and have correctly named the file: lu07.s04.html
  • A04: Safe it.
  • B01: Add a least two more animals to the list, e.g. an eagle and an ice-bear.
  • B02: Extend the already existinc functionality (methods and call of the methods) to the the recent animal-entries.
  • C01: Having less than zero animals makes hardly sence. Catch this case in your method with an correspinding if-statement.
  • D01: Add an button resetAll which resets all counters by using a corresponding method resetAll()
English German
corresponding entsprechend, passende

Volkan Demir

  • en/modul/m291/learningunits/lu07/aufgaben/04.txt
  • Zuletzt geändert: 2025/05/18 12:18
  • von vdemir