Parameters are passed to functions by a value. If a function changes the value of a parameter, the change is not reflected globally or in the calling function. If you pass an object as a parameter to a function and the function changes the properties of the object, the change is visible outside the function.
Example: