Functions are used to reduce the code. The set of code that is written in a function can be used multiple time. thus increasing time and code efficiency.
Basic Example showing how to practically use the for loop with the front end.
For Loop plays a major role in inserting and fetching the data from the database.