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.
a.name = 'c'
c === a
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.
a.name = 'c'; does not change any variable.
That's why the variables are still the same.
There are no references involved.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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.
a.name = 'c'; does not change any variable.
That's why the variables are still the same.
There are no references involved.