The Strict Guardian
Easy+15 XP
Mission Briefing
An imposter is trying to bypass the Kingdom's security! They are inputting the string "5" to trick the gate that requires the number 5. You must reinforce the security check!
The Concept: Strict Equality
The === operator is the ultimate gatekeeper. It checks both the value and the data type. The loose operator (==) would consider 5 == "5" to be true, but strict equality says 5 === "5" is false!
The Objective
Your function receives two parameters, a and b.
- Compare them using strict equality.
- Return
trueif they are strictly equal, otherwise returnfalse.
01EXAMPLE 1
Input
a = 5, b = '5'Output
falseConstraints
- Use === operator.
FundamentalsComparison
JavaScriptSystem handles I/O — write your function only
Loading...
3 Hidden
Input Arguments
a5
b5
Expected Output
true
Click RUN to test your solution