When you put the ++ after the variable, it gets incremented after the assignment. You can also put the ++ before the variable and it gets incremented before the assignment.
Javascript actually behaves exactly the same way as PHP for prefix and postfix incrementing.