I'm trying to combine various code so I want to declare the start of i
ahead of time.
OLD
var i,
max_i = 4;
for (i = 2; i<= max_i; i += 1)
{
//things
}
NEW
var i = 2,
max_i = 4;
for (; i<= max_i; i += 1)
{
//things
}
The problem is that I am getting various errors in JSLint
The code executes fine in both cases.
for (i; i<= max_i; i += 1)
{
//things
}