We can assign any values to ours variables, example: String, Int, Double. But when we assign the type of a variable, we can not change anymore, in other words, if you create a variable with the type string, it will be a string forever
-
var mutableVariableString = "Paulo Santos"
-
var mutableVariableInt = 20
-
var mutableVariableDouble = 10.5
-
var mutableVariableBool = true
-
var mutableVariableString: String = "Paulo Santos"
-
var mutableVariableInt: Int = 20
-
var mutableVariableDouble: Double = 10.5
-
var mutableVariableBool: Bool = true
-
let constantVariableString = "Without typing"
-
let constantVariableInt = 20
-
let constantVariableDouble = 10.5
-
let constantVariableString: String = "With typing"
-
let constantVariableInt: Int = 20
-
let constantVariableDouble: Double = 10.5

