type (v)
!subtitle:说明
获取 v 的类型;返回的结果是字符串:"nil","number","string","boolean","table","function","thread","userdata"。
!subtitle:参数
v - 要获取类型的值
!subtitle:返回值
返回字符串形式的类型名
print(type(nil))
print(type(10))
print(type('hello world'))
print(type(true))
print(type({}))
print(type(function() end))
print(type(coroutine.create (function() end)))
type - Lua 5.4 Reference Manual