Does Javascript pass by reference?
My 2 Cents.... It's irrelevant whether Javascript passes parameters by reference or value. What really matters is assignment vs mutation. I wrote a longer, more detailed explanation here ( Is JavaScript a pass-by-reference or pass-by-value language?) When you pass anything (Whether that be an object or a primitive), all javascript does is assign a new variable while inside the function...
https://stackoverflow.com/questions/13104494/does-javascript-pass-by-reference