Product SiteDocumentation Site

5.3.6.23. last


>>-last--------------------------------------------------------><

Returns the index of the last item in the array or the Nil object if the array is empty. For multi-dimension arrays, index is returned as an array of index items.

Example 5.148. Array class - last method

a = .array~of("Fred", , "Mike", , "David")
say a~last  -- says: 5