Constants: let's be constant


let constantName = .....

Constants (like Variables) define a value. Constants are defined by the keyword "let", as opposed to variables that use the keyword "var". Unlike Variables, Constants cannot be changed once they've been defined. Objective C programmers can think of Contstants as non-Mutable. When defining a Constant the type can either be explicitly defined or can be inferred from the value.

// Constant with Type explicitly declared
let greetings: String[] = ["Hi","Aloha","Ciao"]

// Constant defined with String[] Type inferred
let greetings = ["Hi","Aloha","Ciao"]

// Constant defined with Double Type inferred
let perfect = 10.0

// Declaring multiple Constants at once
let a = 10.0, b = 25.0, c = 52.5