Javascript Object Identities

javascript

Solution

They are different instances of objects, and can be modified independently. Even if they (currently) look alike, they are not the same. Comparing them by their (property) values can be useful sometimes, but in stateful programming languages the object equality is usually their identity.

Problem

Objects in JavaScript have unique identities. Every object you create via an expression such as a constructor or a literal is considered differently from every other object. What is the reason behind this? ``` {}==={}//output:false ``` For what reason they are treated differently? What makes them different to each other?

Original source