hyTags
HomeHome DocumentationDocumentation

array-prepend

Creates a new array with `value` prepended to the beginning.
Parameter
Type
Description
self
[T]
Initial array
value
T
Value to prepend
return
[T]
New array with `value` prepended
Test Case:Prepend to array
    <div></div>
    
    <array-new type="string">
    <array-append value="b">
    <array-append value="c">
    <array-prepend value="a">
    <array-join separator=",">
    <assert-equal value="a,b,c" type="string">
    
    👆 Try to change something!
  • Test succeeded Test failed