re: Getting DOM Elements using JavaScript VIEW POST

FULL DISCUSSION
 

Another way:
const inputs = [...document.getElementById('signup').getElementsByTagName('input')];
// iterate over HTMLCollection
inputs.forEach(element => {
console.log(element);
});

 

Spread operator is very useful. Thank you for the tip 🙌

code of conduct - report abuse