0 / 60 seg.

How can you collect all the values of text input fields within a form with the id "myForm"?

<form id="myForm">
  <input type="text" name="username">
  <input type="text" name="email">
</form>
const formData = new FormData(document.getElementById('myForm'));