DEV Community

Discussion on: Why you should stop declaring variables inside a for loop (especially in JavaScript)

Collapse
 
vjnvisakh profile image
Visakh Vijayan

Nice one ...have the habit of doing this. Shall change this from now onwards.

Collapse
 
technicaljohn profile image
John Holcomb • Edited

Please read the other comments before you change your habit... There is more to this story, and the "good" snippet in the article is flawed.

Collapse
 
jwkicklighter profile image
Jordan Kicklighter

There's no need to do that. Please read the rest of the comments here, as the article is not really correct.