+ 2
In swift what is the need of named types?
For ex: var name: String name="Hello" print(name) //Hello And also, var name="Hello" print(name) //Hello Both results in same output know..!!
2 Antworten
0
Named types assures the var to be the type you specified. It is like Typescript's aspect to javascript. Generally it is used in function paramaters to make sure right paramater type is passed
+ 2
Thanks bro👍