Implement a function deepOmit(obj, keys) that removes specified keys and their corresponding values from an object, including nested objects or arrays.
The function should:
obj.keys.Example
deepOmit({ a: 1, b: 2, c: 3 }, ['b']); // { a: 1, c: 3 } const obj = { a: 1, b: 2, c: { d: 3, e: 4, }, f: [5, 6], }; deepOmit(obj, ['b', 'c', 'e']); // { a: 1, f: [5, 6] }
JavaScript Function
No test results yet
Click "Run" to execute tests