Arrays are complex structures with multiple values. Just because one looks like the other doesn’t make them the same object. It’s like taking two new objects form the same class, they look the same but work independently from eachother. I can add a value to one and the other would be unaffected, they’d both still be the same class
And I can’t take this one. I did not ask if an object referenced by a is the same object referenced by b, I asked if two empty collections of values are equal. And an empty bag can easily be substituted by another empty bag, there is no class/instance tricky business here. And the fact that in JS arrays are objects is again JS-specific insanity. Still I thank you for sharing your thoughts
console.log([] == [])
JavaScript sucks but I’ll give it this one
Arrays are complex structures with multiple values. Just because one looks like the other doesn’t make them the same object. It’s like taking two new objects form the same class, they look the same but work independently from eachother. I can add a value to one and the other would be unaffected, they’d both still be the same class
And I can’t take this one. I did not ask if an object referenced by a is the same object referenced by b, I asked if two empty collections of values are equal. And an empty bag can easily be substituted by another empty bag, there is no class/instance tricky business here. And the fact that in JS arrays are objects is again JS-specific insanity. Still I thank you for sharing your thoughts
It’s false. Different memory addresses, etc.
Like I didn’t know 😂