Dies ist eine alte Version des Dokuments!


LU07.A03 - Methods with several arguments

  • Work type: Individual
  • Means of aid: only teaching materials, no websearch, no use of ai.
  • Timeframe: 15 Minutes
  • Expected result: A Vue-Script, which uses methods to display messages on the screen and increments and decrements a counter.
  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: Make sure that everthing is working correctly: When clicking on the tiger image there must appear a text below the image „Hello, tiger“.

A03: Make sure that you have the title <h1> and have correctly named the file: lu07.s0s.html

  • B01: Currently we can increment by +1 and +5, and decrement by -1.
  • B02: Similar to addMoose add method removeMoose which manages the decrement operations and use it.
  • B03: Test your results and save it.
  • B04: Add more buttons wich can
    1. increment by +10
    2. decrement by -10
    3. decrement by -5
  • B05: The aim is to have 3 increment-buttons (+1, +5, +10) and 3 decrement-buttons (-1, -5, -10)
  • C01: At 0 we must stop counting, when the count reches the zero.
  • C02: Add the case below zero to your removeMoose-method by checking the count with a if-statement
  • C03: Check the result: It must stop at zero when the button removeMoose when the count reaches 0.
English German
corresponding number of times entsprechend oft
to increment erhöhen, hochzählen
to decrement vermindern, herunterzählen
thus somit, dadurch

Volkan Demir

  • en/modul/m291/learningunits/lu07/aufgaben/03.1747560095.txt.gz
  • Zuletzt geändert: 2025/05/18 11:21
  • von vdemir