Skip to main content

Function

A reusable block of code that performs a task when called.

Functions group logic under a name. JavaScript and other languages use functions heavily; HTML markup does not define functions.

Related guides

Related terms