Swift - Variables and Constants
Which of the following Swift code snippets correctly declares a constant integer named
count with an explicit type annotation and value 5?count with an explicit type annotation and value 5?let count = 5 uses type inference, but explicit type annotation requires let count: Int = 5.let count: Int = 5 explicitly declares count as an integer constant with value 5, which is correct.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions