标签: javascript lua
在Lua中,是否有相当于Javascript的apply()函数?
答案 0 :(得分:13)
尝试使用()和unpack
()
unpack
function sayhello(name, message) print("hello " .. name .. ". " .. message) end func1 = sayhello args1 = {"test", "how are you"} func1(unpack(args1))