Question 1/12: This code is valid Swift – true or false?
Hint: Click to show.
struct Student {
var name: String
var sleepy: Bool
func study {
if sleepy {
print("I'm too tired right now.")
} else {
print("I'm hitting the books!")
}
}
}
Link copied to your pasteboard.