NOT A SCRIPT REQUEST!!!!!!
I usually use for i, item in pairs(InsertTableHere) do
when iterating through a table, but recently, I discovered that I can use next() instead of pairs() when iterating a table. I want to know what the different between pairs() and next() is. Thanks!
There the same really,
local Table = {} table.foreach(Table,function(v) -- table.foreach is just like "in pairs()", but less function run time. print(v) end) ========================================================== for _,v in next, (Table) do -- Once it prints the first data then it will move to the next print(v) end ========================================================== for _,v in pairs(Table) do -- A pair is 2, so it just prints 2 at the same time, after that it moves to the next data print(v) end