DEV Community

Discussion on: Weird behaviors of javascript: Primitive Types and Reference Types

 
willsmart profile image
willsmart

I'm signing off the thread btw

Thread Thread
 
pentacular profile image
pentacular • Edited

That's fine, but for future reference, let's note that a.foo doesn't mean that a is a reference.

It does mean that a and b have the same value, and it does mean that that value is used to find a particular property named 'foo' and modify that.

Which makes me think that all of this 'reference' stuff is something someone made up to try to explain javascript in terms of a language with references, like C++, but which doesn't quite fit.