What is difference between 'let' and 'var' declaration ?
Answer / iosraj
constants are expressed with the ‘let’ keyword. So once assigned value can not be change, but assigned values using 'var' keyword can be change.
In terms of objective -c or compare with objective -c, 'var' is Mutable and 'let' is NonMutable.
let kMyConstant = 40
Or
let kMyConstant: Int = 40
var myString = "This is my string."
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the half open range operators in swift?
What are the collection types that are available in swift?
What is swift programming language?
Explain how Swift program is deployed?
Is it worth learning swift 2019?
What is dynamic dispatch swift?
What is interface in swift?
What collection types are available in swift?
Do try catch swift?
What is nsdictionary in swift?
Explain what is half-open range operator?
Why does apple use swift?