var a=[12,26,"pawan",77]; var b=[12,26,"pawan",77]; | Sololearn: Learn to code for FREE!

0

var a=[12,26,"pawan",77]; var b=[12,26,"pawan",77];

Why a==b is not equal ?

3 Answers

New Answer

0

because a and b hold two different objects, even if their items values are equals ^^

+4

Variables, a and b each contain only a reference to a location in memory. Not the value of the object. The locations are separate, so the references are different, and the comparison return false.

-1