Forums
Learn
Careers
Store
About
SUBSCRIBE
NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>
Question 1/12: This code is valid Swift – true or false?
Hint: Trying to read a dictionary using a key that doesn't exist is valid, but won't return any data. Click to show.
let ships = ["Star Trek", "Enterprise"] let enterprise = ships["Star Trek"]
Correct! This attempts to use an array like a dictionary, which is invalid.
Oops – that's not correct. This attempts to use an array like a dictionary, which is invalid.
Return to Review Menu
You are not logged in
Link copied to your pasteboard.