Type annotations let us be explicit about what data types we want, and look like this
let surName: String = "Park"
var score: Int = 1
var score1: Double = 3.1415
var isAuthenticated: Bool = true
we can put type annotaions for Array, dictionary, and set.
var albuns: [String] = ["Red", "Fearless"]
var userId: [String: String] = ["id": "@gmail.com"]
var userPassword: [String: Int] = ["id": 0000]
var books: Set<String> = Set(["Foundation", "Girl", "Eye"])
Type annotation isn’t required, but we still need to know that an array of strings is written as [String] so that we can make the thing.
var teams: [String] = [String]()
Assign an empty array to it
var cities: [String] = []
var clues = [String]()
let username: String
username = "id"
print(username)
Create an array of strings, then write some code that prints the number of items in the array and also the number of unique items in the array.
var check = ["voucher", "age", "Cotton", "feedback", "inject", "inject"]
print(check.count)
print(check)
var check1 = (check)
print(check1.count)