I'm loading the name and id attributes of a <form> called contactForm to a javascript array like this:
const flds=[];
contactForm.querySelectorAll("input").
forEach( value => {
flds.push([value.id, value.name])
});
;
console.log(flds);
Can I do that directly without a loop? Something like:
const flds=contactForm.querySelectorAll("input [name,id]")