Swift 6 · Basics and optionals
Constants and variables
let is constant and var can change. Types are inferred.
let name = "Ada"
var score = 0
score += 10
print("\(name) scored \(score)")
Official Swift 6 documentation
Swift 6 · Basics and optionals
let is constant and var can change. Types are inferred.
let name = "Ada"
var score = 0
score += 10
print("\(name) scored \(score)")
Official Swift 6 documentation
Was this page helpful?