As an alternative to subscripting, use a dictionary’s updateValue(forKey:) method to set or
update the value for a particular key. Like the subscript examples above, the
updateValue(forKey:) method sets a value for a key if none exists, or updates the value if that
key already exists. Unlike a subscript, however, the updateValue(forKey:) method returns the
old value after performing an update. This enables you to check whether or not an
update took place.