#Simple question I assume, Why are these statements true/false
13 messages · Page 1 of 1 (latest)
most languages have this. this is comparing by reference
Yeahh if you were comparing two primitives (string, number, bool .etc) you'd get the opposite. But an array is an object.
the variables are referring to different arrays, that's what the equality check does
Ah gotcha
It checks if its referencing the same array not if the arrays are the same?
if you had const arr2 = arr1; though, you would have them both pointing to the same array, so you'd get them to be equal
yes
{} != {}
!close