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

Prerequisites

Learning objectives

  1. Explaining the The directive v-if in your own word.
  2. Being able to apply v-if in combination with AND/OR operators

Source

Assignment

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.

Solution

Lösung

Vocabulary

English German
afterwards anschliessend
accordingly entsprechend

Volkan Demir