инициализировать массив с нулем в Swift
var threeDoubles = [Double]( repeating: 0.0, count: 3 )
Dangerous Dotterel
var threeDoubles = [Double]( repeating: 0.0, count: 3 )