Set array element at index

 Problem

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



 Recipe


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

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

print(arr)

				


 Playground