Skip to main content

Practice ยท 3 of 3

Pick & Omit

Implement the runtime twins of the utility types: pick(obj, keys) returns only the listed keys that exist, and omit(obj, keys) returns everything except them. Neither may mutate obj; both return fresh objects.

Difficulty: intermediate

Back to lesson: Practice: Shapes & Inference โ€” Practice