Category
برنامهنویسی
Function
Persian equivalent تابع
In plain language A function is a piece of code you can call to perform a particular task.
Short definition It is a callable unit that can accept arguments, execute behavior, and return a result.
Detailed explanation and example
A subtotal function can receive a price and quantity and return their product. Another function might simply write a log entry.