DEV Community


Discussion on: JavaScript Equality Checks

ronakjethwa profile image
Ronak Jethwa Author • Edited

Yes. Two different Objects with same properties are still two different objects with different memory references, so that would still return false with

let user1 = {name: 'John', age:29};
let user2 = {name: 'John', age:29};,user2); // false

Although, this will be different.

let user1 = {name: 'John', age:29};
let user2 = user1,user2); // true