The Logic Gatekeeper

Easy+15 XP

Mission Briefing

The vault requires two keys to open: the Diamond Key AND the Ruby Key. You must construct a logic gate that only opens when both conditions are perfectly met.

The Concept: Logical AND

The && (Logical AND) operator connects two boolean values. It returns true only if both sides are true. If even one side is false, the entire statement becomes false!

The Objective

Your function receives two boolean parameters: paid and shipped.

  1. Use the && operator to check if both are true.
  2. Return the result.

01EXAMPLE 1

Inputpaid = true, shipped = true
Outputtrue

Constraints

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

Input Arguments

paidtrue
shippedtrue

Expected Output

true

Click RUN to test your solution