I have an object defined outside the function, in a global scope. This object is not passed into the function as an argument, but the function does modify it and return the
What I wanted to know is, if the function returns a copy of the object, or the original global object?
Effectively, you only ever deal with references to objects in JavaScript. Even var foo = {} just assigns a reference to a new object to foo.
var foo = {}
foo