ntugumede1985 / boolean-operators-exercise

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Boolean Operators Exercise

Let's write some functions!

  • Write a function called moreThan5 that takes in a number and returns whether or not it's greater than 5.
  • Write a function called topScore 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).
  • 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 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-8 inclusive.
  • Write a function called notAnElementarySchoolAdministrator that takes in a role (as a string) and a school level (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.)
  • Write a function called differentPeople that takes in two names (as strings) and returns whether they're different.

About


Languages

Language:JavaScript 100.0%