Extension functions let you add methods to existing types without modifying them. The receiver is declared in parentheses after |
|
An extension function for |
|
An extension for |
|
Extensions without parameters — parentheses are optional when calling. |
|
You can extend classes too. |
|