This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Programming / Assignments /

Further Examples: AddTo (+=)

This initializes the variable i to the value 7, adds to it, checks its value, and clears it at the end.

In[1]:=

Out[1]=

In[2]:=

Out[2]=

In[3]:=

Out[3]=

In[4]:= i =.