How do I convert a table into a string?

How do I make a table into a string?

Like table = {“yes”, “no”} print(table) and it prints “yes no”

Thanks - BMWLux

I believe you’d need to use table.concat(table, “”); if I remember correctly.

What do you mean table.concat, what is the “” there for?

String separation?

local YOURTABLE = {1,2,3};
table.concat(YOURTABLE, “, “) would print
1, 2, 3.

Just know it’s what separates each table element.

1 Like

table.concat is a built-in function.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.