Objects & Immutability

Deep Omit Keys from Object

mediumJS SpecificJS / TS3 tests

Problem Statement

Implement `deepOmit(obj, keys)` that returns a new object with all occurrences of the specified keys removed at any depth in nested objects or arrays.

Examples

Example 1:
const input = { id: 1, secret: 'x', meta: { secret: 'y', count: 10 } };
deepOmit(input, ['secret']);
// { id: 1, meta: { count: 10 } }
JavaScript & TypeScript starter code included
Run this as a live interview

Practice solo

3 test cases. No second person needed.

Get new interview exercises

Practice problems and review drills, sent when we publish new ones. No spam.

Unsubscribe anytime. We never share your address.