Hacker News new | ask | show | jobs
by moritzwarhier 960 days 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