JavaScript is always pass-by-value. This means everything in JavaScript is a value type and function arguments are always passed by value. That being said, object types are a bit more confusing. Object types are reference types which are passed byvalue. The subtle difference here lies in the fact that an object reference is not the same as passing an object by reference.
6 Comments
Sort: