Declare a constant

 Problem

I want to declare a new constant and assign it a value.



 Recipe


// This is an Integer constant
let a : Int = 2

// This is a String constant
let b : String = "My string"

// This is an Integer constant - no need to declare a type,
// since it's inferred from the right-hand side value
var c = 5
				


 Playground