Function with Variable Argument
https://www.tutorialspoint.com/lua/lua_functions.htm
It is possible to create functions with variable arguments in Lua using '...' as its parameter. We can get a grasp of this by seeing an example in which the function will return the average and it can take variable arguments.
function average(...) result = 0 local arg = {...} for i,v in ipairs(arg) do result = result + v end return result/#arg end print("The average is",average(10,5,3,4,5,6))
When we run the above code, we will get the following output.
The average is 5.5