var lightSwitchOn: Bool = true var dimmer: Int = 7 var dimmerWithDecimals: Float = 3.14 var veryPreciseDimmer: Double = 3.14159265359 print(type(of: lightSwitchOn)) print(type(of: veryPreciseDimmer))
Bool Double
Double, Bool, String, Float
use let to declare a constant when we expect its value to remain the same
we expect let not change
let encouragement = "You can do it!" var personalizedEncouragement = "You can do it, Stephanie!" personalizedEncouragement = personalizedEncouragement.replacingOccurrences(of: "Stephanie", with: "Ryder") let birthYear = 2008 var currentYear = 2016 var age = currentYear - birthYear age = currentYear - birthYear