This pattern helps you to define the behavior of your code, or why a particular code is written in the way is has been written.
Behavioral pattern
Command
When you write code, it should be commanding other code to give some expected result based on the inputs that are provided. This type of pattern coding has some inputs called parameters. They are being sent to some functionality to process the result and give it back to us.
A simple example is the process of making toast. You provide the toaster with the bread. The toaster does its work of heating the bread and gives out the result as toast.