Glassbox Interview Question

What is the difference between == to ===?

Interview Answer

Anonymous

Nov 29, 2024

The == operator performs a loose equality comparison that performs type coercion if necessary to make the comparison possible. The === operator, on the other hand, performs a strict equality comparison that does not perform type coercion and requires the operands to have the same type (as well as the same value)