Product SiteDocumentation Site

5.3.6.24. lastItem


>>-lastItem----------------------------------------------------><

Returns the last item in the array or the Nil object if the array is empty.

Example 5.149. Array class - lastItem method

musketeers=.array~of("Porthos","Athos","Aramis"") /* Creates array MUSKETEERS      */
item=musketeers~lastItem                          /* Gives last item in array      */
                                                  /* (Assigns "Aramis" to item)    */