Strict Equality (===)
noun
say it: “STRIKT ih-KWOL-ih-tee” /strɪkt ɪˈkwɒlɪti/
JavaScript's === comparison, which is true only when the values and their types are both the same.
What is Strict Equality (===) in JavaScript?
Strict Equality (===) — A comparison that requires equal values and matching types without coercion.
const enteredCode = "42";
const expectedCode = 42;
const matches = enteredCode === expectedCode;
In a sentence
- “With strict equality, 1 === "1" is false.”
Level: Novice · More JavaScript terms at this level
Updated