The Backup Plan

Easy+15 XP

Mission Briefing

The auxiliary generator must power on if the main grid fails OR if the manual override is flipped. You need to verify if at least one backup system is active.

The Concept: Logical OR

The || (Logical OR) operator acts as a safety net. It returns true if at least one of the operands is true. It only returns false if both sides are utterly false.

The Objective

Your function receives two booleans: isUser and isAdmin.

  1. Return true if either isUser OR isAdmin is true using the || operator.

01EXAMPLE 1

InputisUser = false, isAdmin = true
Outputtrue

Constraints

  • Use || operator.
FundamentalsLogic
JavaScript
Loading...
3 Hidden

Input Arguments

isUserfalse
isAdmintrue

Expected Output

true

Click RUN to test your solution