Product SiteDocumentation Site

5.3.12.21. lastItem


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

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

Example 5.171. Queue class - lastItem method

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