I've seen various people use stuff like i++
, and I know that is also used in a for-loop.
But what exactly does ++
do to a variable? I cannot seem to find any documentation on what it does.
I've seen various people use stuff like i++
, and I know that is also used in a for-loop.
But what exactly does ++
do to a variable? I cannot seem to find any documentation on what it does.
The ++ notation is the increment operators.
i++ is the same thing of
i = i +1
here you can see the completly list of this operators: http://www.w3schools.com/js/js_operators.asp