How do I check the amount of items in a table?

How do I check the number of items in a table?

4 Likes

You can use the ‘#’ operator.

local table = {1, 3, 5, 10}

print(#table) -- 4
10 Likes