What are functions?
As programming developed over the years, people realised the need to give a feature to programming languages in which they could get a block of code to be executed only when it is asked to be. The block can be reused, and thus used to carry out common procedures.
And hence functions were born!
So, in simple terms, functions just serve to gather code in one place that can be called multiple times at will.
There are thousands of instances when we need to execute code when something happens or just want to seperate different tasks under different names. Functions are the best deal for this.
In the coming chapters you will be able to relate pieces of this information to actual code and thus better understand all this stack of detail about functions. Let's begin with function creation first..