SyntaxFix
Write A Post
Hire A Developer
Questions
const x = {obj1: 1, pass: 2, obj2: 3, obj3:26}; const objectWithoutKey = (object, key) => { const {[key]: deletedKey, ...otherKeys} = object; return otherKeys; } console.log(objectWithoutKey(x, 'pass'));