Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • \$\begingroup\$ forEach can just be map, no? also you might be able to use innerText (edit: right, querySelectorAll returns a NodeList and not an array because Javascript is like that - leaving this comment in case anyone else gets confused) \$\endgroup\$ Commented Oct 14 at 10:00
  • \$\begingroup\$ @emanresuA this is actually one of the problems i encountered when doing this for real, i didn't think it would be relevant here though \$\endgroup\$ Commented Oct 14 at 11:31
  • \$\begingroup\$ perhaps this is a firefox/chrome thing but this completely freezes the page when I paste it in my browser console. ff 143.0.4 \$\endgroup\$ Commented Oct 14 at 11:35
  • \$\begingroup\$ I've only tested in Chrome, @Themoonisacheese. \$\endgroup\$ Commented Oct 14 at 11:44
  • \$\begingroup\$ at least it doesn't crash the tab in chrome but it does require i click somewhere each time. the task is that every button gets clicked every 50ms which is not happening here. \$\endgroup\$ Commented Oct 14 at 13:20