JavaScript creation date: update date:

Differences between ==, === and Object.is() in JavaScript

== Loose Equality

The == operator performs type coercion before comparing values

=== Strict Equality

It doesn’t perform type coercion or value conversion, but there are two notable behaviors to be aware of:

Object.is() Same-Value Equality

As the name suggests, it compares if two values are the same. Despite starting with “Object”, it can compare any two values.

Unlike ===, Object.is() handles the special cases of zero and NaN differently:

Reference

What Is the Difference Between ==, === and Object.is in JavaScript?| ExplainThis