Function is a fundamental concept in programming and mathematics that refers to a block of organized, reusable code or a relation between inputs and outputs.
In programming, a function is a self-contained module of code that accomplishes a specific task.
The term "function" also has other meanings:
1. In mathematics, a relation that associates each element of a set with exactly one element of another set
2. The purpose or role that something is designed to perform
3. A formal ceremony or social gathering