So today I came upon a different way to insert things into table which utilized square brackets
I don't fully understand what I should use and why they both do the same thing is there any difference? or any reason I should use one over one?
local Way1 = {}
for i,v in pairs(game.Workspace:GetChildren()) do
Way1[#Way1 + 1] = v.Name
end
for _,v in pairs(Way1) do
print(v)
end
local Way2 = {}
for _,v in pairs(game.Workspace:GetChildren()) do
table.insert(Way2,v)
end
for i,v in pairs(Way2) do
print(v)
end
