Skip to content

Instantly share code, notes, and snippets.

@dandorman
Created November 3, 2016 20:22
Show Gist options
  • Save dandorman/d46b1dc5f0929bd64ad918771966b68e to your computer and use it in GitHub Desktop.
Save dandorman/d46b1dc5f0929bd64ad918771966b68e to your computer and use it in GitHub Desktop.
// Write a function that returns the "leaves" of a nested map like the one below.
// You may assume values are either numbers, or another map.
{
a: 1,
b: {
c: 2,
d: {
e: 3,
f: 4
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment