getElementsByClassName() and getElementsByTagName() are both return live HTMLCollection of…
Konstantin Rouda

Sure, you can use Array.prototype.forEach alternatively. I remember using it at my most recent job at Goodyear Tire company as the Lead React Engineer for over a year on the team. But there — we used .map a lot more often. Good call though. Literally.