back to the lesson

Check the range outside

importance: 3

Write an if condition to check that age is NOT between 14 and 90 inclusively.

Create two variants: the first one using NOT !, the second one – without it.

The first variant:

if (!(age >= 14 && age <= 90))

The second variant:

if (age < 14 || age > 90)