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

What is the benefit of using guard statement in swift?

882


What are the advantages of using swift for ios development?

879


How many access levels are present in swift?

972


Are arrays structs in swift?

797


What is floating point number in swift?

853


What is nsrange in swift?

834


Explain me what is swift?

879


How long does a swift transfer take?

859


What is unowned in swift?

915


What is mvp in swift?

839


Mention what is the difference between Swift and ‘Objective-C’ language?

1510


Is swift a functional language?

920


Is swift difficult to learn?

868


How can you write a multiple line comment swift?

829


What is difference between any and anyobject in swift?

845