Remove all items from dictionary

 Problem

I want to remove all elements from an existing dictionary.



 Recipe


// Initialize the Dictionary
var dict = ["name": "John", "surname": "Doe"]
 
// Remove all elements

dict.removeAll()

print(dict)
				


 Playground