Can I/what syntax should be used to specify default values for the parameters of a function?



function func(param) param = param or 42 print(param) end func(36) -->36 func() -->42 |
[Please log in to post a comment]
Can I/what syntax should be used to specify default values for the parameters of a function?
function func(param) param = param or 42 print(param) end func(36) -->36 func() -->42 |
[Please log in to post a comment]