Terminology: Arguments vs. Parameters

Learn the difference between arguments and parameters.

We'll cover the following

We’re slightly simplifying terminology here. We conflated two terms that would normally would be defined separately.

That is, we use the term “argument” for both the variable names that are defined in the arguments list of the method definition and the value that’s passed as part of the method call.

Distinction

Typically, the argument list is called a parameter list instead, and a single name on it is called a parameter.

On the other hand, only the objects passed when calling the method are referred to as arguments.

For example, consider the following code:

Press + to interact
def add_two(number)
number + 2
end
puts add_two(3)

The word number in the first line is a parameter, whereas 3 in the last line is an argument.

Though useful to know, this distinction is largely confusing and unimportant for beginners.