DEV Community

loading...

Discussion on: Passed By Reference Vs. Value In Javascript

baso53 profile image
Sebastijan Grabar

This exactly. Almost no resource explains this correctly and I think that this is one of the harder things to explain to beginners, but also one of the most important. Obviously, someone who had some C/C++ education would be a bit better at understanding the reasons why this happens, but even those lessons are usually not very good at explaining the differences in detail.

Your explanation on the other hand is pretty good. And good job! :)

Thread Thread
sleeplessbyte profile image
Derk-Jan Karrenbeld • Edited

I guess I'll write an article.

That said, I completely understand where Brian is coming from. It's moreso the lack of writing than that it's super hard. I think Brian did a stellar job giving us the difference of passing an object/array vs primitive, in the practical sense, which is in the end the only thing the beginner will really use.