This is a central concept in writing good code. A function allows you to make a small piece of code which does one thing well and often can be reused if the same functionality is needed in multiple places. Functions apply a core design principal: /wiki/spaces/IXB/pages/3181903910.
Functions are Block statements.
Here’s a simple example:
function APPhello() return "Hello"; end
Arguments are variables which are used to pass data into a function. For example:
function APPadd(a,b) return a + b end APPadd(2,3) -- returns 5
See: