2 ms·
What's wrong with for (const input of document.querySelectorAll('#some-form input') { input.classList.add('error'); } ? In fact, this has an even ear
by moritzwarhier 3y ago
What's wrong with
for (const input of document.querySelectorAll('#some-form input') {
input.classList.add('error');
}
?
In fact, this has an even earlier baseline browser compatibility than
NodeList.prototype.forEach