if i=0 javascript code example
Example 1: javascript for loop
for (var i; i < 10; i++) {
}
Example 2: javascript break out of loop
//break out of for loop
for (i = 0; i < 10; i++) {
if (i === 3) { break; }
}
for (var i; i < 10; i++) {
}
//break out of for loop
for (i = 0; i < 10; i++) {
if (i === 3) { break; }
}