strict equality

Comparing two values with === or !==, which never convert either value to another type first, so values of different types are never equal.

In more detail

Prefer them to == and !=, which convert types in surprising ways: 0 == '' is true. For objects, === checks whether both sides are the same object, not whether their contents match. TypeScript also narrows types on them, so after val !== null the value cannot be null.

Related terms

Taught in

References