Don't make function within a loop

I tried to make a function in a for loop and saw below warning.
“Don’t make function within a loop”.

Is it really important? And if it is important what is the reason??

My guess would be the function will get created at every iteration.

http://jshint.com/docs/options/#loopfunc

2 Likes