Creates a new, empty array.
SDK
- Xcode 6.0.1+
Framework
- Swift Standard Library
Declaration
init()
Discussion
This is equivalent to initializing with an empty array literal. For example:
var emptyArray = Array<Int>()
print(emptyArray.isEmpty)
// Prints "true"
emptyArray = []
print(emptyArray.isEmpty)
// Prints "true"