Implement a function deepOmit(obj, keys) that removes specified keys and their corresponding values from an object, including nested objects or arrays. It works recursively to traverse the entire object structure, ensuring that all occurrences of the specified keys are removed at all levels. The function takes an object (obj) and an array of string keys (keys).
keys.Date, RegExp, Map, and Set as-is.deepOmit({ a: 1, b: 2, c: 3 }, ['b']); // { a: 1, c: 3 }
A more complicated example with nested objects:
const obj = {a: 1,b: 2,c: {d: 3,e: 4,},f: [5, 6],};deepOmit(obj, ['b', 'c', 'e']); // { a: 1, f: [5, 6] }
console.log() statements will appear here.