Technology Fundamentals

Parameter

Definition

A parameter is a variable in a function definition. When a function is called, the arguments are the data you pass into the function's parameters.

Why It Matters

Parameters make functions flexible and reusable. They allow a function to perform the same task on different data without having to be rewritten.

Contextual Example

In the function definition `function greet(name)`, `name` is the parameter. When you call the function with `greet("Alice")`, the string "Alice" is the argument that gets assigned to the `name` parameter.

Common Misunderstandings

  • Parameter" is the variable in the function declaration. "Argument" is the actual value passed to the function when it is called.
  • The number and type of arguments passed to a function must typically match the parameters it expects.

Related Terms

Last Updated: December 17, 2025