Question:

What output will be produced by the code below?

struct Spaceship {
    var name: String {
        willSet {
            print("I'm called \(newValue)!")
        }
    }
}

var serenity = Spaceship(name: "Serenity")
serenity.name = "TARDIS"

Answers:


Keywords:

© 2017 QuizBucket.org