A function is a reusable piece of code that performs a specific action.Functions can either return values when simply perform an operation without returning any value.