How can i fix "cannot assign value of type 'x' to type 'y'" in swift?

Example:

let number: String = 5
This error arises when you try to assign a value of one type to a variable of another type.

Solution:

let number: String = "5"

Beginner's Guide to Swift