Tested this from the reference: https://developer.apple.com/documentation/swift
var string = String(count: 5, repeatedValue: \"a\") // string is \"aaaaa\"
Swift 3:
var array = Array(repeating: 0, count: 5)
Output: [0, 0, 0, 0, 0]