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: AppendTo

This defines a list.

In[1]:=

Out[1]=

This appends the number to the end of the list.

In[2]:=

Out[2]=

The original list is changed as a side effect.

In[3]:=

Out[3]=

On the other hand, Append does not change the new version of the list.

In[4]:=

Out[4]=

In[5]:=

Out[5]=

In[6]:= b =.