JavaScript has a few different ways to increment a digit by one, and it's important to understand how each of them work.
Examples:
var i = 0;
var a = i++;What does a equal here?
console.log( a );
0What about i?
console.log( i );
1Ok, weird, let's start over.
var i = 0;
var a = ++i;What does a equal here?
console.log( a );
1What about i?
console.log( i );
1Now, last one:
var i = 0;
var a = i += 1;What does a equal here?
console.log( a );
1What about i?
console.log( i );
1All that being said, i++ is the most common way to handle any kind of quick incrementing in JS or most other langs that have ++ in them. Watch out while debugging!