Property Observers are methods that can be added to any variable, constant or field
● Method willSet (newValue) is called before the new value is stored
● Method didSet (oldValue) is called after the new value is stored
Property Observer Syntax
var name : String = "John" {
willSet (newValue) { let text = "Changing name from \(name) to \(newValue)" } //Before the value is set
didSet (oldValue) { name = "\(oldValue) Name is invalid" } //After the value is set
}