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
/
Swift fundamentals
Which statement about var retryCount = 0 is correct?
from Swift fundamentals
Swift 6.3.3
beginner
1 min
Which statement about var retryCount = 0 is correct?
The compiler infers Int, and later assignments must still be compatible with Int.
var makes the declaration dynamically typed, so it can later hold a String.
The declaration has no type until its first read.
Swift infers Double for every numeric literal.
Check
Ask AI about this kata
Report an error
next kata
Why does Swift not accept text[0] for a String?
Quiz
A new version is available
Reload