i have two different object with same values
for example :
obj = {name:"John"}
obj 2 = {name :"John"}
when i am trying compare both object, not values its giving me false
obj === obj 2 or obj == obj 2 //i tried both
i thought i will return true , but i don't know why it return false even both values are same ;
And when i did this
obj 3 = obj
obj 3 === obj
it returns me true as output.
help me. . Thanks in advance.