JSLint keeps complaining about things like this
var myArray = [1, 2, 3];
for (var value in myArray)
{
// BLAH
}
Saying that I should wrap it in an if statement. I realize you need to wrap it if you are looping over an object's properties, but here what should I put in the if statement to do the correct filtering.
Additionally when I do something like
for (var i = 0; i < 10; i++)
{
// foo
}
for (var i =0; i < 20; i++)
{
// bar
}
It complains that i has already been defined. How do I prevent this other than using different variable names?