A parameter is the name of a variable passed into a function. Parameters allow functions to accept inputs. An argument, on the other hand, is the actual value of the variable (also known as the parameter) passed into a function.


Suppose we have a function called tripleThis():

function tripleThis(x) {
return x * 3;

The parameter is x since it is the variable. The argument is 6 since it is the actual value.


Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn More on Codecademy