Skip to content

Instantly share code, notes, and snippets.

@esperancaJS
Last active November 24, 2020 13:48
Show Gist options
  • Save esperancaJS/ee652dd5fbaef0f6de6438480d48a46a to your computer and use it in GitHub Desktop.
Save esperancaJS/ee652dd5fbaef0f6de6438480d48a46a to your computer and use it in GitHub Desktop.
JS Map <> Array Transitions
// Loop through object parameters (making it easy to edit them all the same way)
Object.entries({a: 1, b:2}).reduce((p,[k,v]) => ({ ...p, [k]: v }), {})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment