Validating Values

Recap

Housekeeping

  • Question: Why does 3 > 2 > 1 evaluate to false?
  • This afternoon: Dark Mode in VueJS/Nuxt

1. Utility Functions

Materials

Demo: Ratio to Percentage Converter

2. Value validation

Materials

Breakout Activity

In pairs, refactor the GST Calculator so that:

  • NaN no longer appears in the response
  • toPercentage() will return false for negative numbers
  • The response for negative numbers is "Please use a positive rate."
  • Any others?

3. Scope

Materials

4. Activity: Text area counter

Materials

Activity


Prep