Insert item at array index

 Problem

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



 Recipe


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

// Insert value '6' at index '2'
a.insert(6, atIndex:2)

print(a)
		
				


 Playground