Naming incrementing variables

admin

Administrator
Staff member
I typically use i as my primary counter and then j for a second loop if it is nested within the first, etc, etc.

1) Is there a typeical Javascript naming convention for the counters or incrementers used in loops?

2) Is there any problem whatsoever in Javascript with using these same counters over and over in the same script if they are in separate loops and not nested?

I have never had a problem with this, but I would like to know what, if any, potential problems might pop up.

many thanks,

BT
 
Back
Top