Question 1/12: This code is valid Swift – true or false?
Hint: Click to show.
func playSong(_ name: String, notes: () -> String) {
print("I'm going to play \(name).")
let playedNotes = notes()
print(playedNotes)
}
playSong("Mary Had a Little Lamb") {
return "EDCDEEEDDDEGG"
}
Link copied to your pasteboard.