update descriptions

This commit is contained in:
Nikita
2019-03-15 13:16:03 +03:00
parent c7fb5aa189
commit 670abc519e
2 changed files with 9 additions and 2 deletions

View File

@ -2,7 +2,9 @@
Encode a set of form elements as a `object`.
First we transform the `form` into `FormData`, then we convert it into an `array` and from the `array` we collect an `object`
1. Convert the HTML form to `FormData()`
2. Convert `FormData()` to `Array` using ` Array.from()`
3. We collect an object from an array using `Array.prototype.reduce()`
```js
const formToObject = form =>