Set array element at index


I have an array and want to set a new value to one of its elements, by index.


// Initialize the Array
var arr = ["one", "two", "three"]

// Set element at index: 1
arr[1] = "TWO"



Heard the news?

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