JavaScript For Loop


/ Published in: JavaScript
Save to your folder(s)

I saw this useful little variation of a for loop in a tutorial by Kevin Yank at Sitepoint. By adding an additional variable "ii" in the loop's arguments, you can avoid having your program calculate the length of your array every time it loops through. Saves on processing. Delightful.

URL: http://www.sitepoint.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.