Question: what is nsarray in swift?
Answer: Array is a struct, therefore it is a value type in Swift. NSArray is an immutable Objective C class, therefore it is a reference type in Swift and it is bridged to Array<AnyObject> . NSMutableArray is the mutable subclass of NSArray . ... It will also work if you do let arr instead of var as with other reference types.