Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Swift
/
Optionals
Which statement accurately describes String? in Swift?
from Optionals
Swift 6.3.3
beginner
1 min
Which statement accurately describes String? in Swift?
It is shorthand for Optional<String>, with .some(String) and .none states.
It is a String whose empty value is automatically treated as nil.
It is an untyped pointer that can be assigned to any variable.
Check
Ask AI about this kata
Report an error
previous kata
Why does input.flatMap { Int($0) } return Int? instead of Int???
Quiz
next kata
Which three states are printed for these dictionary lookups?
Predict the output
A new version is available
Reload