Introduction
Return values let a function send back a result after it finishes. This helps you use that result later in your script.
When you want a function to give back a calculation result.
When you need to check if a task succeeded or failed.
When you want to reuse a value from a function in other parts of your script.
When you want to organize your script into smaller, reusable pieces.