Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

What Are Parameters Used For In Functions?

What Are Parameters Used For In Functions?

2 answers

✓ Accepted answer

They are used to reference argument(s) someone might use when they call the function. For example:

function add(x, y)
	print(x + y);
end
add(5, 6);
--11

1 comment

0

Thanks!

A parameter is an interchangable piece of data that a function processes.

For example, in math.abs(n), n is the only parameter. The actual data put in place of the parameter is called an argument. So if I were to call math.abs(-2), -2 would be the argument I'm using to fill out the parameter.

2 comments

0

NOT THAT PARAMETER AND NOT THAT FUNCTION

0

Accidently had caps :P

This discussion is preserved as it was. New answers, comments, and votes are closed.