De Morgan's Revenge

HardAcc. 54.2%
+55 XP 20

Negative Boundary Logic

Sometimes logic is defined by what it is not. In this challenge, we are looking for values that fall outside a specific safe zone.

Safe Zone: A number is "Safe" if it is between 10 and 20 (inclusive).

The Assignment

Your function receives two parameters: a and b.

  1. Return true only if neither a nor b is in the Safe Zone.
  2. If even one of them is in the Safe Zone, return false.

01EXAMPLE 1

Inputa = 5, b = 25
Outputtrue

Explanation: Both are outside the 10-20 range.

Constraints

  • Use logical operators and comparisons.
  • Return a boolean.
LogicBooleanMastery
JavaScript
Loading...
3 Hidden

Input Arguments

a5
b25

Expected Output

true

Click RUN to test your solution