table.insert(arr, 1, 'val')
table.insert
- will append given value to the given arrayarr
- array to append value to'val'
- value to append to array, 1
- will insert new value at the beginning (first element) of the array
group: array_add
arr = {2, 3}
table.insert(arr, 1, 1)
print(table.concat(arr, ', '))
1, 2, 3
link_youtube: https://youtu.be/4SN3NkPB78k