Page 119, Listing 11.11:
But you don’t have sets. You have arrays. No problem! Create two new arrays by initializing them with your sets:
let players = [“Anna”, “Vijay”, “Jenka”]
let winners = [“Jenka”, “Jenka”, “Vijay”, “Jenka”]
let playerSet = Set(players)
let winnerSet = Set(winners)
Correct me if I’m wrong but shouldn’t it be written as Create two new sets by initializing them with your arrays? Because set constants are created from passing arrays as arguments.
Page 120, first paragraph after Figure 11.4:
You can also go the other way, creating a set from an array using code like
let players2 = Array(playerSet).
And also in this case, shouldn’t it be written as creating an array from a set?