---
Array, mainly used to save data, in Swift, the creation of arrays is more powerful than OC, but at the time of initialization, found a few problems, perhaps because of self-study reasons, through the search, reluctantly persuade themselves (mainly initializing the problem)
As follows:
var arr = ["abc", 123, 234.323]
arr + = ["value"]
Print(" appended array \(arr)")
Results
[ABC, 123, 234.323, AAA]
But
var mutableA2 = []
MutableA2 + = ["123"]
Really error, obviously I have insufficient skills, but write here, but think can, check memory address to see. Then I looked at the official document because there was no type defined?!
But if I want to define a mutable array like OC, then what to do is to not specify a fixed type, that is, an initialization of a mutable array, after looking at the official document,
var anotherthreedoubles = Array (count:3, repeatedvalue:2.5) This looks like the initialization of a variable array of OC.
Swift Learning Plan x day--Array (initialization problem)