DEV Community

Discussion on: Not everything is an object in JavaScript

 
mmartinezsoria profile image
Maximo Martinez Soria • Edited

I don't think that example is correct.
Just give it a try.

After a.name = 'c', c === a is still true.
Changes are applied to both variables, because they are just a reference.

On the other hand, I agree about ecmascript. But Mozilla is just a common implementation.

And btw, thank you for taking your time to contribute to the discussion. I find really interesting to know different points of view.

Thread Thread
 
pentacular profile image
pentacular

a.name = 'c'; does not change any variable.

That's why the variables are still the same.

There are no references involved.