Why Are Two Similar Objects Not Equal in JavaScript?
In JavaScript, two objects may not be equal even though they appear to be similar. Why is that the case? ๐ค Let's understand why.
For example:
const obj1 = {
name: "Dillion"
}
const obj2 = {
name: "Dillion"
}
console.log(obj1 === obj2)
// false
...
lalitkumawat1m.hashnode.dev5 min read