Write a function editUser(user) that gets a user object.
Add the property surname with the value 'Smith', change name to 'Pete' and delete the property age. Leave the other properties as they are. Return the same object.
editUser({ name: 'John', age: 30 })Returns { name: 'Pete', surname: 'Smith' }
editUser({ name: 'Ann', city: 'Oslo' })Returns { name: 'Pete', city: 'Oslo', surname: 'Smith' }
editUser({ name: 'John', age: 30 }){ name: 'Pete', surname: 'Smith' }editUser({ name: 'Ann', city: 'Oslo' }){ name: 'Pete', city: 'Oslo', surname: 'Smith' }Hidden tests run on Submit.