# What is Function?

In code, a reusable named block that takes inputs, runs steps, and often returns a result.

## In real work

Ask the agent to extract the duplicated logic into one function before you approve the PR.

## Related terms

- [Variable](https://prompthausapp.com/learn/variable.md)
- [String](https://prompthausapp.com/learn/string.md)
- [Integer](https://prompthausapp.com/learn/integer.md)
- [Boolean](https://prompthausapp.com/learn/boolean.md)
- [Array](https://prompthausapp.com/learn/array.md)

## How is this different from Googling it?

Google gives a definition. Prompthaus pairs each term with how it shows up in standups, PRs, prompts, and design reviews—then quizzes you until the word sticks. One term a day on iPhone.

- Category: Code Literacy
- HTML: https://prompthausapp.com/learn/function
- App Store: https://apps.apple.com/us/app/prompthaus-ai-vocabulary/id6776314407
