I have seen many examples where people have nested for loops and they change their increment variable (i,j,k).
for(var i=0;i<array.length;i++){
for(var j=0;j<array.length;j++){
for(var k=0;k<array.length;k++){
}
}
}
So my question is why doesn't calling a function from a for loop, that has a for loop inside it not cause a collision of the increment variables? Is it because of the function scope nature of javascript or is it colliding and I just haven't had a problem. Example:
for(var i=0;i<array.length;i++){
callFunction()
}
function callFunction(){
for(var i=0;i<arry.length;i++){
console.log(i)
}
}