An extension function adds a new method to an existing class without inheriting from it or editing its source.