Which JavaScript operator compares both value and type, without type conversion?
Correct answer
A. ===
15 views
A. ===
15 views
Strict equality (===) returns true only when type and value both match, so 5 === "5" is false. Loose equality (==) converts types first, which can give surprising results, and !== is strict inequality.
Asked in: Frontend Developer Tests, Technical Interviews
Not sure why the answer is A? Ask here and get an explanation.