Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.12 KB | None | 0 0
  1. // we'll call this "reduce ...spread"
  2. let result = items.reduce((acc, item) => ({
  3. ...acc, [item.name]: item.value
  4. }), {})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement