# Parameter (JavaScript)

A parameter (also known as an input parameter) is a way of receiving a variable into a…

## What is a **parameter**?

A **parameter** (also known as an **input parameter**)
is a way of receiving a variable into a function.

Parameters are defined when creating a function. The declared
paramaters are variables that are in scope throughout
the function (they are only available to access inside
the function body.)
```javascript
// the variables *first* and *second* are input parameters
function add(first, second) {
    return first + second;
}
```

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

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/parameter-javascript
