When to 'for and when to 'while'


#1

var counting = true;

for(i = 0; i > 10; i++){
console.log(i);
};
while(counting){
console.log("This is a while loop!");
counting = false;
};
Anything wrong with this?


#2

i will never be greater than 10. :slightly_smiling: