DEV Community

Discussion on: Arrays and objects are stored by reference

 
pentacular profile image
pentacular

Every distinct array has a unique value.

So [] === [] creates two distinct arrays and compares their values (not their elements or properties).

What is an address in javascript?

Thread Thread
 
aleksandrhovhannisyan profile image
Aleksandr Hovhannisyan

You're being pedantic and it's honestly really off-putting. I have to agree with Manolo Edge—do you not have anything better to do?

Yes, JavaScript doesn't have "references." But it's the accepted terminology in JavaScript land, just like it is in Java and Python.

The important thing to understand is what references are under the hood (pointers). What you call them, at the end of the day, is not important, as long as everyone's on the same page.

Thread Thread
 
pentacular profile image
pentacular

What do they point at?

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
pentacular profile image
pentacular

What's a memory address in javascript?

Thread Thread
 
ml318097 profile image
Mehul Lakhanpal • Edited

return && break && throw new Errror('✋');

Thread Thread
 
Sloan, the sloth mascot
Comment deleted