hyTags
HomeHome DocumentationDocumentation

array-get

Gets the element at the specified index.
Parameter
Type
Description
self
[T]
Array to get element from
index
Number
Index of element to get
return
T
Element at index, or nil if index is out of bounds
Test Case:Get element at index
    <div></div>
    
    <array-new type="string">
    <array-append value="a">
    <array-append value="b">
    <array-append value="c">
    <array-get index="1">
    <assert-equal value="b" type="string">
    
    👆 Try to change something!
  • Test succeeded Test failed