JSLint suggests you use other loops such as forEach. http://www.jslint.com/help.html#for
You can just select the tolerate “for statement” option at the bottom if this bothers you but the code looks fine.
More Related Contents:
- What does "use strict" do in JavaScript, and what is the reasoning behind it?
- Why avoid increment (“++”) and decrement (“–“) operators in JavaScript?
- What is the difference between `new Object()` and object literal notation?
- How to initialize an array’s length in JavaScript?
- How to fix jslint error ‘Don’t make functions within a loop.’?
- Immediate function invocation syntax
- (…()) vs. (…)() in javascript closures [duplicate]
- JavaScript function order: why does it matter?
- How to split a long regular expression into multiple lines in JavaScript?
- What’s wrong with var x = new Array();
- What is array literal notation in javascript and when should you use it?
- JSLint is suddenly reporting: Use the function form of “use strict”
- Should I use JSLint or JSHint JavaScript validation? [closed]
- Why should you not use Number as a constructor? [duplicate]
- JSlint error ‘Don’t make functions within a loop.’ leads to question about Javascript itself
- JSLint error: Move all ‘var’ declarations to the top of the function
- Don’t make functions within a loop [duplicate]
- JSLint “insecure ^” in regular expression
- JSLint Expected ‘===’ and instead saw ‘==’
- Why is JSHINT complaining that this is a strict violation?
- JSLint Error: Unexpected ‘this’
- What does the JSLint error ‘body of a for in should be wrapped in an if statement’ mean?
- JSLint: was used before it was defined
- JSLint: Using a function before it’s defined error
- JSLint: control comments (selective ignore)
- Matching text field value with array value
- Are trailing commas in arrays and objects part of the spec?
- Intercept page exit event
- Group by Date with Local Time Zone in MongoDB
- How to implement an onmousedown and onmouseup on an iPhone touch screen