DEV Community

Discussion on: 24 modern ES6 code snippets to solve practical JS problems

Collapse
 
fetishlace profile image
fetishlace

To point 12.
Instead of confusing reduce I would do rather:
const formToObject = form => Object.fromEntries([...new FormData(form)])
(when Object.fromEntries() is available indeed...)