Foolin' With Booleans

Workflow

Just your typical fork, clone, and run the tests kind of exercise!

Tasks

  • Write a function called moreThan5 that takes in a number and returns whether or not it's greater than 5.
  • Write a function called isNewTopScore that takes in a score (as a number) and a top score (as a number) and returns whether or not the score is greater than the top score. (This would be a good function in a game or gamified app to see if we need to update the high score to a new one.)
  • Write a function called isInDanger that takes in a grade (as a number) and returns whether or not it's between 60 and 71, inclusive.
  • Write a function called isCoasting that takes in a grade (as a number) and returns whether or not it's between 72 and 83, inclusive.
  • Write a function called isSucceeding that takes in a grade (as a number) and returns whether or not its between 84 and 92, inclusive.
  • Write a function called isFailing that takes in a grade (as a number) and returns whether or not it's below 60.
  • Write a function called isAcing that takes in a grade (as a number) and returns whether or not it's above 92.
  • Write a function called isStudent that takes in a role (as a string) and returns if its value is "student".
  • Write a function called isTeacher that takes in a role (as a string) and returns if its value is "teacher".
  • Write a function called isAdmin that takes in a role (as a string) and returns if its value is "admin".
  • Write a function called isElementary that takes in school level (as a string) and returns if its value is "elementary".
  • Write a function called areDifferentPeople that takes in two names (as strings) and returns whether they're different.
  • Write a function called isMiddleSchoolTeacher that takes in a role (as a string) and a level (as a number) and returns whether they're both a teacher and the level they teach at is 6 to 8 inclusive.
  • Write a function called notAnElementarySchoolAdministrator that takes in a school level (as a string) and a role (as a string) and returns whether they're NOT an elementary school administrator. (An elementary school teacher is not, nor is a middle school administrator. And an expert scuba diver most definitely is not.)