Function

a.k.a. method, procedure, routine, subprogram

In computer science a function is a set of instructions to perform a specific task.


Example

A javascript function that adds two numbers.

function add(a, b) {
  return a + b;
}