# Parameters and Arguments (JavaScript)

A parameter is defined by the function to specify what input is required to call the…

## What is the difference between  a **parameter** and an **argument**?

A **parameter** is defined by the function to specify what
input is required to call the function.
```javascript
function add(first, second) {
    return first + second;
}
```

An **argument** is a value that is passed into
a function when calling the function
```javascript
let costOfChocolate = 3.49;
let costOfMilk = 3.99;
// *costOfChocolate* and *costOfMilk* are arguments on line 4
let sum = add(costOfChocolate, costOfMilk);
```

Level: Apprentice · [More JavaScript terms at this level](https://www.ask-codey.com/glossary/subjects/javascript/apprentice)

Updated: September 19, 2026

Source: https://www.ask-codey.com/glossary/parameters-and-arguments-javascript
