Day 5

  • Take Home Review
  • Functions
  • Daily Challenge
  • Method vs Function
  • Scopes
  • Take Home Challenge
  • Questions?
  • Anonymous Functions
  • Parameters
  • function Declaration vs Function Expressions
  • Calling a Function
  • return Keyword
  • Arrow Functions
  1. Create a new codepen
  2. Write a function that accepts a number as an argument
  3. alert the user whether the given number is even or odd
  4. Call your function
  • Questions?
  1. Write a function that accepts a password (string)
  2. Validate the password using the following rules:
    • Must be 6-20 characters long
    • Must start with a letter
  3. alert the user if their password has been accepted or why their password was rejected