files/en-us/glossary/parameter/index.md
Parameters are named variables declared as part of a {{Glossary("function")}}. They are used to reference the {{Glossary("argument", "arguments")}} passed into the function.
For example:
const argument1 = "Web";
const argument2 = "Development";
example(argument1, argument2); // passing two arguments
// This function takes two values
function example(parameter1, parameter2) {
console.log(parameter1); // Output = "Web"
console.log(parameter2); // Output = "Development"
}
There are two kinds of parameters:
Note the difference between parameters and arguments: