Nick Walter Challenges (Part 5)
Yes I managed to find time for one more session! So here we go - now going on to properties. The next several will be all linked to class aspects, so I'm actually going to go through them before the challenges. Always worth building my knowledge up on these as I need to! Start Time - 20:34 Computed Properties So from what I can remember about these, the property is not stored but requires some sort of computation. In the example below, I have two stored properties: class Dog { var name = "" var age = 0 } So this is a computed property - it requires the use of the stored property of age and creates a temporary one of current year. Makes total sense. var birthYear: Int { let currentYear = 2018 return currentYear - age } This looks like a function - using return and all. I could actually use a function but a computed property is bet...