Forums
Learn
Careers
Store
About
SUBSCRIBE
NEW: Learn SwiftData for free with my all-new book! >>
Question 1/6: Which of these lines make variables?
Hint: Make sure the type annotations match what's placed inside! Click to show.
Option 1:
var score: Double = 10
This creates a variable called score.
score
Option 2:
var isActive: Bool = 0
This attempts to assign an integer to a Boolean, which is invalid in Swift.
Correct!
Oops – that's not correct.
Return to Review Menu
You are not logged in
Link copied to your pasteboard.