9951 explained code solutions for 126 technologies


luaHow to prepend an element to array


table.insert(arr, 1, 'val')ctrl + c
table.insert

will append given value to the given array

arr

array to append value to

'val'

value to append to array

, 1

will insert new value at the beginning (first element) of the array