- Swift can’t figure out what type should be used.
For example, if you were loading some data from the internet that you know happens to be the name of your local politician, Swift can’t know that ahead of time so you’ll need to tell it.
2. You want Swift to use a different type from its default.
(Ex: var percentage: Double = 99)
3.You don’t want to assign a value just yet.
The third option happens when you want to tell Swift that a variable is going to exist, but you don’t want to set its value just yet. This happens in lots of places in Swift, and looks like this:
Var name: String