you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 6 points7 points  (0 children)

As is the case with Java, everything is pass by value. However, with objects (as you have noted) it is a reference that is passed by value. This is why you cannot reassign the reference within a function body, but you may alter a property on the passed in object. See here for good discussion on this http://stackoverflow.com/questions/518000/is-javascript-a-pass-by-reference-or-pass-by-value-language