Skip to content
BENIBIX Learn

Parameter vs Argument

The parameter is the named blank in the function. The argument is the real value that fills it when you call it.

Development🧩 Programming Concepts

Parameter

A name in a function. It holds the value the function is given later.

A parameter is a name in a function that stands for a value it will be given. It is written in the brackets when the function is made, like width and height. Inside the function, the parameter works like a variable. Each time the function is called, the parameter holds whatever value was passed in. A function can have none, one or many.

Example
The function area(width, height) has two parameters. Called with 3 and 4, width is 3 and height is 4.
Why it matters
They let one function work on many values. Without them, each number would need its own function.
Full entry
Development🧩 Programming Concepts

Argument

The value you give a function when you call it, like 3 in area(3, 4).

An argument is the real value you hand to a function when you call it. In area(3, 4), the arguments are 3 and 4. Each argument fills one of the function's parameters, in order. Arguments can be numbers, strings, variables or whole expressions. Some languages also let you pass them by name, like area(height=4, width=3).

Example
Lucy calls send_email with an address and a subject. Those two values are the arguments.
Why it matters
Arguments are how you tell a function which value to work on this time. The same function gives a new answer for new arguments.
Full entry

In one line

Parameter
A name in a function. It holds the value the function is given later.
Argument
The value you give a function when you call it, like 3 in area(3, 4).