Introduction
Functions help you organize your code into small, reusable pieces that do one job.
When you want to repeat a task many times without writing the same code again.
When you want to break a big problem into smaller, easier steps.
When you want to give a name to a set of instructions to make your code clearer.
When you want to use the same code in different parts of your app.
When you want to test parts of your code separately.