hyTags
HomeHome DocumentationDocumentation

array-get-last

Gets the last element of the array.
Parameter
Type
Description
self
[T]
Array to get last element from
return
T
Last element, or nil if array is empty
Test Case:Get last element
    <div></div>
    
    <array-new type="string">
    <array-append value="first">
    <array-append value="last">
    <array-get-last>
    <assert-equal value="last" type="string">
    
    👆 Try to change something!
  • Test succeeded Test failed