hyTags
HomeHome DocumentationDocumentation

array-get-first

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