What does varName++ mean?


#1



Could someone please clearly explain to me what varName++ means in a for loop?
Example code:

var food = ["burger", "burrito", "tuna sandwich",];

for(var burger = 0; burger < food.length; burger++){
console.log("I want a " + food[burger]);
}


#2

This it the shorthand for i = i + 1. varable++ means increment, or add 1 to variable value.


#3

Ok thanks. This might be useful. =D


#4

Not only, 'might', be useful. If you are in this for the long haul, it is moot.