Help with setmetatable

I was reading this post and I am can’t figure why this code (from the code sample from the link) works the way it does:

local myTable = {}
setmetatable(myTable,{})

-- OR

local myTable = setmetatable({},{})

How is the top one have the same result as the bottom one?

setmetatable returns its first argument, so the table that you want to give a metatable to.

3 Likes