+ 1
functions within loop
Why cant i make functions within the loop here on sololearn in javascript. this is will be highly DRY and even ineffective if we have to manually put addEventListeners to all the buttons on the page etc??
4 odpowiedzi
+ 1
no we cant.. it says dont make a function inside a loop
+ 1
i am trying to addEventListener to all buttons on the pg.. i think it makes sense to do that inside a loop instead of adding them individually to each button
0
Ehm...we can...
0
Guess its more like tip or about Creating functions inside loop which have no sence.