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"
Example: Solution:How can i fix "cannot assign value of type 'x' to type 'y'" in swift?
This error arises when you try to assign a value of one type to a variable of another type.
let number: String = 5
let number: String = "5"