Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Don't understand what the code inside means? [NOT SOLVED]

Asked by 10 years ago

--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")

0
Code block, plz Tesouro 407 — 10y
0
? RexSays 0 — 10y

Answer this question