Removes the given key and its associated value from the dictionary.
- Xcode 8.0+
- Swift Standard Library
The key to remove along with its associated value.
The value that was removed, or
nil if the key was not present in the dictionary.
If the key is found in the dictionary, this method returns the key’s associated value. On removal, this method invalidates all indices with respect to the dictionary.
If the key isn’t found in the dictionary,
Complexity: O(n), where n is the number of key-value pairs in the dictionary.