let scores = Map.new() Map.set(scores, "Alice", 95) Map.set(scores, "Bob", 87) print(Map.get(scores, "Alice")) // 95 print(Map.has(scores, "Charlie")) // false for key in Map.keys(scores) { print("{key}: {Map.get(scores, key)}") }
Goal: Create a map of capitals and print the capital of Brazil.
Run the code to see the output
9 results