UNPKG

playground

Version:

Create Xcode Playgrounds for the Swift programming language with rich documentation generated from Markdown

10 lines (7 loc) 358 B
# Simple Variables Use `let` to make a constant and `var` to make a variable. The value of a constant doesn’t need to be known at compile time, but you must assign it a value exactly once. This means you can use constants to name a value that you determine once but use in many places ```swift var myVariable = 42 myVariable = 50 let myConstant = 42 ```