[ create a new paste ] login | about

Link: http://codepad.org/dZnpXUov    [ raw code | output | fork ]

Lua, pasted on Oct 17:
1
2
3
4
5
6
mymap = {one = 1, two = 2, three = 3}

local n=0
for _ in pairs(mymap) do n=n+1 end

print("mymap has " .. tostring(n) .. " elements")


Output:
1
mymap has 3 elements


Create a new paste based on this one


Comments: