@Aanwar,
in order to understand the code you have written, it is important to understand the post-increment and pre-increment operations.
assuming you have a variable called myVar, performing;
myVar++;
will increment the value of myVar after it’s assignment. Meaning, that if before the line of code above the value of myVar was 0. After this code runs it will be 1.
On the opposite end,
++myVar;
increments the value of myVar and then executes it’s assignment. Meaning, the value will first increment to 1.