It depends upon the position of ++ - if it is before the variable, it will increase the value in the variable and return the new value. If it is after, it will return return the value before the increment, but still increase the value stored in the variable.
We're a place where coders share, stay up-to-date and grow their careers.
Top comments (1)
It depends upon the position of
++- if it is before the variable, it will increase the value in the variable and return the new value. If it is after, it will return return the value before the increment, but still increase the value stored in the variable.