let obj = {foo: 1, bar: 2, baz: 3} function removeProperty(obj, propertyName) { let { [propertyName]: _, ...result } = obj return result } console.log(removeProperty(obj, 'foo'));