My Question is the below example in function and closure why we need to use this line
func sumOf(numbers: Int...)
with three dots (...) ?
func sumOf(numbers: Int...) -> Int {
var sum = 0
for number in numbers {
sum += number
}
return sum
}
sumOf()
sumOf(42, 597, 12)
what is meaning for these dots ??