FormData iterators in JavaScript
FormData is
an iterable.
Accordingly, the values, keys,
entries iterators are built into it.
Let's iterate over the values of form elements:
javascriptfor (let value of formData.values()) {
console.log(value);
}
Now let's loop through the names of form elements:
javascriptfor (let key of formData.keys()) {
console.log(key);
}
Now let's iterate over the key-value pairs of form elements:
javascriptfor (let entry of formData.entries()) {
console.log(entry);
}
Задание 1
Given a form with three inputs. Get the form data and loop through it.