Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is difference between 'let' and 'var' declaration ?



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

Post New Answer

More Apple iOS Swift Interview Questions

Is swift hard to learn?

0 Answers  


Is swift easier than java?

0 Answers  


What is @objc in swift?

0 Answers  


What are adapter and memento patterns?

0 Answers  


Is ios written in swift?

0 Answers  


How to pass the data between view controllers?

0 Answers  


Explain how you define variables in Swift language?

1 Answers  


What is $0 and $1 in swift?

0 Answers  


Who created swift?

0 Answers  


What is the difference between nil and none in swift?

0 Answers  


Difference in classes and structures in swift?

0 Answers  


Explain what Lazy stored properties is and when it is useful?

1 Answers  


Categories