Module:Sandbox

-- This is a sandbox for testing lua scripts. -- See Extension:Scribunto for more information.

p={}

function p.q local r='' t={'a'} r=r..'\n\n'..p.f(t) table.insert(t,'b') r=r..'\n\n'..p.f(t) t['u']='v'   r=r..t.u     r=r..type(1)..type('u')..type(t)..type(t[4])..type(t.u)    r=r..'\n\n'..p.f(t) table.insert(t,'c') r=r..'\n\n'..p.f(t) return r end

function p.f(t) local r='' for n,v in ipairs(t) do      r = r..n..'='..v..', ' end r=r..'\n\n' for n,v in pairs(t) do      r = r..n..'='..v..', ' end return r end

return p