Remove all items from array

 Problem

I want to remove all elements from an existing array.



 Recipe


// Initialize the Array
var a = [1,2,3]

// Remove all elements

a.removeAll()

print(a)

		
				


 Playground