Forums
Learn
Careers
Store
About
SUBSCRIBE
BLACK FRIDAY SALE: Save 50% on all my Swift books and bundles! >>
Question 1/6: Which code creates an integer?
Hint: Swift gives variables the string type when their values are enclosed in quotes, regardless of what the value is. Click to show.
Option 1:
var mortgageRemaining = 100_000
This creates an integer called mortgageRemaining.
mortgageRemaining
Option 2:
var dogBreed = "samoyed"
This creates a string.
Correct!
Oops – that's not correct.
Return to Review Menu
You are not logged in
Link copied to your pasteboard.