Function append()

← Back to Module core



Module core → append()

Description

Add new element to the end of an array

append(arr, value)


Parameters


Return Value


Usage Example

a = [1, 2, 3]
append(a, 4)
append(a, 5)
 
' a is:
' array(
'    [0] = 1,
'    [1] = 2,
'    [2] = 3,
'    [3] = 4,
'    [4] = 5
' )