2 ms·
> The pass-reference-by-value behavior is shared by a lot of languages, I'm not sure why you want to avoid comparison with them. That's a fair point. I just th
by Stratoscope 9y ago
> The pass-reference-by-value behavior is shared by a lot of languages, I'm not sure why you want to avoid comparison with them.
That's a fair point. I just think a lot of JavaScript programmers are confused about this, and end up thinking that primitives and objects are passed in two different ways. Even MDN makes this mistake:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guid...
My use of "things" and "names" is just an attempt to get away from this confusion.