When we use the debugDescription property of a dictionary instance on a dictionary, we want to get the string that represents the contents of that dictionary. This property is useful and suitable for debugging.
dictionary.debugDescription
The value returned is a string.
// create some dictionariesvar days = [0 : "Sunday",1 : "Monday",2 : "Tuesday",3 : "Wednesday",4 : "Thursday",5 : "Friday",6 : "Saturday"]// get the debug descriptionprint(days.debugDescription)
days. We then give it some entry values.debugDescription property and print the value to the console.