iOS Swift - Swift Language Essentials
Which of the following is the correct way to declare a variable named
score with initial value 10 in Swift?score with initial value 10 in Swift?var is used to declare variables that can change, and the syntax is var name = value.var score = 10 uses correct syntax. let score = 10 declares a constant, not a variable. score var = 10 and variable score = 10 are invalid syntax.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions