functions within loop | SoloLearn: Learn to code for FREE!

+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??

9/21/2017 11:20:08 AM

adeel salim

4 Answers

New Answer

+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.