Question 1/12: This code will print some output – true or false?
Hint: Click to show.
class Museum {
var name = "National Museum"
}
class HistoryMuseum: Museum { }
class ToyMuseum: Museum { }
let museum = ToyMuseum()
if let unwrappedMuseum = museum as? HistoryMuseum {
print("This is the \(unwrappedMuseum.name).")
}
Link copied to your pasteboard.