# Function Declaration

A named function created with the function keyword as a statement.

## What is **Function Declaration** in JavaScript?

**Function Declaration** — A named function created with the function keyword as a statement.

```javascript
function total(price, quantity) {
    return price * quantity;
}
```

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/function-declaration
