What is the difference between `let` and `var` in swift?

后端 未结 30 1015
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 11:09

What is the difference between let and var in Apple\'s Swift language?

In my understanding, it is a compiled language but it does not check

30条回答
  •  囚心锁ツ
    2020-11-22 11:36

    Everyone has pretty much answered this but here's a way you can remember what's what

    Let will always say the same think of "let" as let this work for once and always as for "var" variable's can always change hence them being called variable's

提交回复
热议问题