tanzie1313 / dom-events-lab

0 stars 0 forks source link

duplicate forEach #1

Closed DigitalPhoneme closed 1 week ago

DigitalPhoneme commented 2 weeks ago

https://github.com/tanzie1313/dom-events-lab/blob/1de704413308b8099e5a997f9813af15190b2682/app.js#L22

The buttons.forEach(...) loop is used twice to register the same click event listener, which is redundant and can lead to performance issues.