Swift - Functions
Identify the error in this Swift function declaration:
func add(numbers: Int...) -> Int {
return numbers.reduce(0, +)
}
add(1, 2, 3)func add(numbers: Int...) -> Int {
return numbers.reduce(0, +)
}
add(1, 2, 3)15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions