# Function definition

A reusable block of code that  can be executed from other parts of your application.

## What is the purpose of a **function**?

A **function** is a **reusable block of code** that 
can be called from other parts of your application.

Functions help keep your code **DRY** 
(Don't Repeat Yourself) by helping you avoid having 
multiple identical blocks of code.

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

Updated: October 12, 2026

Source: https://www.ask-codey.com/glossary/function-definition
