I’m currently building a simple book log, and am having a bit of trouble with forms.
The goal is to use an event listener to activate with the submit event, then gather all of the inputs into an array so that I can create a custom object.
I’ve found a very basic way of doing this, but I’m wondering if there is a better (cleaner?) way?
let valueList = ; document .querySelectorAll('input[type="text"]') .forEach(element => valueList.push(element.value));
This would be inside an event listener.