So ive converted a lua script to work on javascript manualy, they both need to get the same output.
The original: (lua version)
local tab = {}