O'Reilly logo
  • Ahmed Elgendy thinks this is interesting:

We’ve already talked a bit about how arguments are passed to functions—arguments are passed by value, which means pass-by-copy. So if we pass an integer, the corresponding function parameter gets a copy of the value of that integer for its use in the function. The same rules hold true for objects, however, we should look a little more closely at what pass-by-value means for objects to understand what happens when you pass an object to a function.


Cover of Head First JavaScript Programming


what do you mean by pass-by-value again when it comes to functions?