Introduction
Default parameters let you give a value to a function input if no value is provided. Adding types helps catch mistakes early.
When you want a function to work even if some inputs are missing.
When you want to avoid errors from undefined inputs.
When you want to make your code easier to understand by showing expected input types.
When you want to provide common default values for function inputs.
When you want to keep your functions flexible and safe.