Javascript – Is the value accessed as the value of the name attribute of the form element HTMLFormElement?
<form name="formBox"> <input name="inputOne"> <input name="inputTwo"> <button name='btn'>BUTTON</button> </form> for (let i of document.formBox) { console.log(i) }; The above code works fine. But, isn't document.formName an HTMLCollection? Why can I use a for..of statement? I thought document.formName returns HTMLElement. However,…