Why you should use var in your for loop control variables

Had a conversation recently about JavaScript and the importance of var for scoping your variables- even in for-loop control variables; This little gotcha still seem’s to get a few devs so thought I would post a fiddle…


  1. #1 by Gareth on August 10, 2012 - 12:47

    Cheers mate, that is really useful!

(will not be published)