All challenges
JavaScript challenge · Frontend
Squash Object
Difficulty
medium
Time
~25m
Format
Single
Grading
Auto-graded
#frontend#javascript#typescript#objects#recursion
Mission file // read carefullymedium
Implement squash(obj) that flattens a nested object into one level using dot-separated paths as keys. (Assume plain nested objects — no arrays.)
squash({ a: { b: 1, c: { d: 2 } } }) // => { 'a.b': 1, 'a.c.d': 2 }
Build with
TypeScriptJavaScript
Hidden test suite
Auto-graded on submit
Start challenge
Sign in to save your progress.