Function

A named piece of code you can run whenever you like.

Think of it as A recipe card: give it ingredients, get a dish back.

A function takes parameters, which are the inputs it needs, and can return a result. A function that only prints does not return anything, and nothing means nil.

Related terms