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 ?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain deinitializer in swift programming language?

803


Should I use struct or class swift?

837


What are the advantages of using swift for ios development?

781


Is swift faster than java?

708


What is the difference between closure and function in swift?

752


What is abstract class in swift?

812


What is reuseidentifier in swift?

801


What is a tuple in swift?

689


How long does a swift transfer take?

751


What is an attribute in swift?

828


How to write a multiple line comment in swift?

831


What is encapsulation in swift?

804


Why we use delegates in swift?

779


What are the most important features of swift?

790


What is a function in swift?

766