DEV Community

JustinW7
JustinW7

Posted on

Difference between ++i and i++?

What is the difference between ++i and i++ .
I spent almost 4 hours to understand this ...
++i is pre increment and i++ is post increment

What is the effect and how does it affect

i =1;
++i=2;
i

Top comments (0)