Programming in Swift: Fundamentals

Oct 19 2021 Swift 5.5, iOS 15, Xcode 13

Part 5: Functions & Named Types

37. Challenge: Functions

Lesson Complete

Play Next Lesson
Next
Save for later
About this episode
See versions

See forum comments
Cinema mode Mark as Complete Download course materials
Previous episode: 36. Functions & Return Next episode: 38. Structures

Update Notes: The student materials have been reviewed and are updated as of October 2021.

Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.

You can unlock the rest of this video course, and our entire catalogue of books and videos, with a kodeco.com Professional subscription.

It’s time for your next challenge! You can find the challenge in the “04 - Challenge - Functions” page of the playground you’ve been using, or you can download a new one from the resources for this video. Open it up, and try solving the challenge questions on your own, then keep watching to compare your work to mine. Good luck!

func printFullName(firstName: String, lastName: String) {

}
  print(firstName + " " + lastName)
printFullName(firstName: "Chris", lastName: "Belanger")
func printFullName(_ firstName: String, _ lastName: String) {
printFullName("Chris", "Belanger")
func calculateFullName(_ firstName: String, _ lastName: String) {
  print(firstName + " " + lastName)
}
func calculateFullName(...) -> String {
  return firstName + " " + lastName
let fullName = calculateFullName("Chris", "Belanger")