Array Functions
repeat
Syntax
array.repeat(number type)Makes an array with the given element number of times.
foo := [1, 2].repeat(5)
println(foo) // [1, 2, 1, 2, 1, 2, 1, 2, 1, 2]delete
Syntax
array.delete(ix type)Deletes the element present in the array at index ix.
mut even_numbers := [2, 4, 6, 8, 10]
even_numbers.delete(3)
println(even_numbers) // [2, 4, 6, 10]reverse
Syntax
Reverses the array.
clone
Syntax
Clones and returns a new array.
Last updated
Was this helpful?