You can easily increment or add one to a variable with the
is the equivalent of
i = i + 1;
The entire line becomes
i++;, eliminating the need for the equal sign.
Change the code to use the
++ operator on
Learn more about Arithmetic operators - Increment (++).