A function is a block of code or group of reusable code that performs a specific task and which can be called anywhere in your program.