Programming in Swift: Functions & Types, Episode 8: Conclusion | raywenderlich.com

Review what you learned about functions in this part of the course, and see what is coming up in the next part.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/28433240-programming-in-swift-functions-types/lessons/8

Using β€œfor” as an argument parameter label is confusing. Is there another label that could be used in the tutorials instead? Thanks!

// current
func getHighestGrade(for grades: Int...) -> Int{
  grades.max() ?? 0
}

// possible proposed
func getHighestGrade(studentGrades grades: Int...) -> Int{
  grades.max() ?? 0
}

getHighestGrade(studentGrades: jessyGrade, ozmaGrade)