Swift: Replace String array at index
I have the following String Array:
var stringArray:[String] = ["value1", "value2", "value3", "value4"]
how can I replace for example the third String with index 2 ("value 3") with another string?
Solution 1:
Simple as that:
stringArray[2] = "new string"