table.concat and table.move
Efficiently join arrays and copy table slices with built-in functions.
table.concat Basics
table.concat(t, sep, i, j) joins array elements into a string. sep defaults to "".
Simple Join
Join an array of strings with a separator.
local fruits = {"apple", "banana", "cherry"}
print(table.concat(fruits, ", ")) -- apple, banana, cherryAll lessons in this course
- table.sort with Comparators
- table.concat and table.move
- Deep Copy and Shallow Copy
- Transforming Tables: map, filter, reduce