unsplash-logo Fabian Grohs What is a function in programming? A function in computer programming is just a block of related and reusable code which performs a single task or activity. Function is also called method, procedure, sub-routine etc. I will try to cover each and every aspect of functions here. I have divided this post into two sections. One section explains the structural components and the other explains non-structural components. I am categorizing these things because I think it will help you better understand functions. These categories are not official. Tell me in the comments whether you liked the categorization or not. Based on your response, I will update this post. Structural Components: There are four structural components of a function: Name Body Input Output 1. Name: Function name is the same as a variable name. It follows the same conventions a variable name follows. Special characters and spaces are not allowed in function name. Name o...