0Pricing
Lua Academy · Lesson

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, cherry

All lessons in this course

  1. table.sort with Comparators
  2. table.concat and table.move
  3. Deep Copy and Shallow Copy
  4. Transforming Tables: map, filter, reduce
← Back to Lua Academy