Lesson 19 of 24 · +140 xp
Extension
Add to existing types.
Explained simply
Your task
Write: extension Int { func squared() -> Int { return self * self } }
Lesson 19 of 24 · +140 xp
Add to existing types.
Write: extension Int { func squared() -> Int { return self * self } }