The fast-acting equivalent of arrayWIthObjects?
3 answers
In quick play, you can use an array like this
let array: NSArray = [kLMEnglish]
var array:NSArray! = [kLMEnglish]
var arrayMutable = [kLMEnglish] as NSArray
let arrayImmutable = [kLMEnglish] as NSArray
var array = [kLMEnglish]
// if it is String
var array: [String] = [kLMEnglish]
// if it is Integer
var array:[Int] = [kLMEnglish]
If the beginning of the line starts with var , that means a variable and allows the contents of the array to change in the future.
If the beginning of the line starts with let , which means a constant and means that the contents cannot be changed in the future.
+1
source to share