Implement `flattenObject(obj)` that returns a new object with no nesting: each leaf value is keyed by its full dot-separated path. Nested plain objects are flattened; arrays and primitive values are treated as leaves (kept as-is).
+ 2 hidden tests run on Submit.
A depth-first walk carries the path built so far. Plain objects are descended into; arrays and primitives are written to the result under their full path. Because the walk follows key insertion order, the output keys come out in a predictable order.
Run your code to see results.