I would like to have a variable, which can have multiple types (only ones, I defined), like:
var example: String, Int = 0 example = \"hi\"
You can use Tuple.
Tuple
Example:
let example: (String, Int) = ("hi", 0)
And access each data by index:
let stringFromExampleTuple = example.0 // "hi" let intFromtExampleTuple = example.1 // 0