How do I make a 2D array in Lua?
snippet in lua

How do I make a 2D array in Lua?

user6221

-- Create a 3 x 5 array
grid = {}
for i = 1, 3 do
    grid[i] = {}

    for j = 1, 5 do
        grid[i][j] = 0 -- Fill the values here
    end
end