Guest User

Untitled

a guest
Jan 23rd, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. // two form of init of empty dictionary
  2. let emptyDictionary1 = [String:Int]()
  3. let emptyDictionary2 : [String : Int] = [:]
  4.  
  5.  
  6. // two form of init of array with two elements tuple
  7. let emptyArrayOfTuple1 : [(String , Int)] = []
  8. let emptyArrayOfTuple3 : [(name : String , score : Int)] = []
  9.  
  10. // two form of init of array with two elements tuple
  11. let emptyArrayOfTuple2 : [(String , Int, Int)] = []
  12. let emptyArrayOfTuple4 : [(name : String , score : Int, age : Int)] = []
  13.  
  14. // DictionaryLiteral
  15. var recordTimes1: DictionaryLiteral<String , Double> = [:]
  16.  
  17. var recordTimes2: DictionaryLiteral<String , Double> = ["Florence Griffith-Joyner": 10.49,
  18. "Evelyn Ashford": 10.76,
  19. "Evelyn Ashford": 10.79,
  20. "Marlies Gohr": 10.81]
Add Comment
Please, Sign In to add comment