init(repeating:count:)
Creates a new array containing the specified number of a single, repeated value.
Declaration
init(repeating repeatedValue: Element, count: Int)Parameters
- repeatedValue:
The element to repeat.
- count:
The number of times to repeat the value passed in the
repeatingparameter.countmust be zero or greater.