Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Difference between 'var' and 'let' in swift programming language

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 370
    Comment on it

    In Swift, both defines a variable.

    The let keyword define a constant like

    let api_key = 42979

    The api_key cannot be changed afterwards; Its value is set once and only once

    The var define an ordinary variable that hold the data like

    var name = 'swift'

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: