Initializer

init()

Creates a new, empty array.

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"

Relationships