IT練習ノート

IT関連で調べたこと(実際は嵌ったこと)を書いています。

luaの型

luaに型がある。typeファンクションで確認ができる。

number

> type(1)
> = type(1)
number
> return  type(1) == 'number'
true

function

> type (function() print("hello") end)
> = type (function() print("hello") end)
function
> return  type (function() print("hello") end) == "function"
true

table

> type ({})
> = type ({})
table