The parameters in a function call are the function’s arguments.
In JavaScript, arguments are passed by value: the function only receives the values, not the locations (references) of the arguments.
If a function modifies an argument’s value, it does not affect the original value of the parameter.
Changes made to arguments inside the function are not reflected outside the function.
In JavaScript, object references are treated as values.
As a result, objects behave as if they are passed by reference:
If a function modifies an object property, it alters the original value.
Changes to object properties are reflected outside the function.