You can pass an object to a function in the function argument and have access to all of the object’s properties within the function…