--Declare a function called addNumbers with the parameters "a" and "b" function addNumbers(a,b) --make a variable called "ans", and set it to the sum of a and b. local ans = a + b --Return the variable called ans. return ans end
--Declare a variable called "answer" to the value of the addNumbers function, with the arguments 1 and 2. answer = addNumbers(1, 2) --Print the answer to the output. print(answer)
ALSO
function sayHello(name) print("Hello, " .. name .. "!") end
sayHello("Bob")