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.
- Return
trueif eitherisUserORisAdminis true using the||operator.
01EXAMPLE 1
Input
isUser = false, isAdmin = trueOutput
trueConstraints
- Use || operator.
FundamentalsLogic
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
isUserfalse
isAdmintrue
Expected Output
true
Click RUN to test your solution