Both Conditions

EasyAcc. 94.2%
+30 XP 10

Entry Approvals

Taking important steps like bank withdrawal depends on meeting all conditions. The Logical AND (&&) only approves verification if both left and right statements return a true value.

The Assignment

Your inputs are age and a card check hasID.

  1. Check if the age is strictly greater than 21.
  2. Check if hasID is actively true.
  3. Use the && symbol to merge these rules smoothly, and return the combined boolean.

01EXAMPLE 1

Inputage = 25, hasID = true
Outputtrue

Explanation: Both age > 21 and hasID are true.

Constraints

  • Use the && operator.
  • Return true only if both logic blocks match.
FundamentalsLogicOperators
JavaScript
Loading...
5 Hidden

Input Arguments

age25
hasIDtrue

Expected Output

true

Click RUN to test your solution