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

Last

Last[expr]
gives the last element in expr.
  • Last[expr] is equivalent to .
Extract the last element of a list:
Extract the last row of a matrix:
The head need not be List:
Extract the last element of a list:
In[1]:=
Click for copyable input
Out[1]=
 
Extract the last row of a matrix:
In[1]:=
Click for copyable input
Out[1]=
 
The head need not be List:
In[1]:=
Click for copyable input
Out[1]=
Last[expr] is equivalent to :
The expression is evaluated before Last is applied:
Last always operates on the FullForm of expressions:
New in 1