Remove item at array index

 Problem

I have an Array and want to delete an item at a specifix index position.



 Recipe


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

// Remove item at index: 2
a.removeAtIndex(2)

print(a)
		
				

Heard the news?

The Swift Cookbook for Swift 3 is at last here! For iBooks, Kindle and Paperback.
Hurry up - and Check it out! ;-)

 

 Playground