A recipe gets way more useful when you can change the ingredients. Parameters are the ingredients you pass in, and return is the finished dish you hand back. Together they turn a function from “do a fixed thing” into “do a thing with whatever I give it.”
local function double(n)
return n * 2
end
local result = double(8)
print(result) -- 16
The thing in the parentheses when you define it (n) is the parameter, a placeholder waiting for a real value. The thing you put in when you call it (8) is the argument, the actual value. Lua slots the argument into the parameter and runs the body.
Then return does something special: it ships a value back out so you can store it, print it, or feed it into another function. A function without return does its work and hands back nothing. A function with return gives you an answer to keep. That difference is exactly what lets you build a sell-price calculator or a damage formula in your tycoon later.
Now make it yours: write add(a, b) that returns the sum, then print add(4, 9). Once that works, write a tripleIt function and use it on the result.