by Example


Constants in Swift are declared using the "let" keyword.

Once declared, the value of a constant cannot.
Reassigning a new value to a already declared constant
will result in a compilation error.

let pi = 3.14

print("The value of pi is \(pi)")

$ swift .swift
The value of pi is 3.14

Next: Arrays