LU05.A12 - v-if, v-else ... combined with AND/OR operators

  • Work type: Individual
  • Means of aid: only teaching materials, no websearch, no use of ai.
  • Timeframe: 20 Minutes
  • Expected result: A Vue script that displays HTML elements based on input values.
  1. Explaining the The directive v-if in your own word.
  2. Being able to apply v-if in combination with AND/OR operators

This assignment combines if with the using of AND/OR operators. That means that several rules must be obeyed in the if-clause.

  1. Change the value within the if to <12 for people under the age of 12 are allowed to go to the cinema.
  2. Execute your script
  3. Between 12 and 16 they are allowed up to 18 o'clock.
  4. Execute your script
  5. Person older than 16 may go to the cinemas without time restriction.
  6. Execute your script
  7. Comment and save your script your results accordingly.
  8. Change your script for young customers may also go to the cinema when they are accompanied by an adult. Therefore will need a additionel variable withAdult which must be checked within the selection area by combining the existing restrictions with an AND/OR operator.
  9. Execute your script
  10. Comment and save your script your results accordingly.
English German
afterwards anschliessend
accordingly entsprechend

Volkan Demir

  • en/modul/m291/learningunits/lu05/aufgaben/12.txt
  • Zuletzt geändert: 2025/01/28 14:48
  • von vdemir