# Rest Parameter

A final function parameter beginning with ... that collects remaining arguments into an array.

## What is **Rest Parameter** in JavaScript?

**Rest Parameter** — A final function parameter beginning with ... that collects remaining arguments into an array.

```javascript
function total(...prices) {
    return prices.reduce((sum, price) => sum + price, 0);
}
```

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/rest-parameter
