Introduction
Extensions let you add new features to existing code without changing it. This keeps the original code safe and clean.
You want to add a new function to a class from a library you can't change.
You want to keep your code organized by adding helpers outside the main class.
You want to add features to built-in types like String or List.
You want to avoid breaking existing code by not modifying original classes.