Quiz: Deduce the Outputs
Explore your knowledge of Go's map data structure by deducing outputs in quiz questions. This lesson helps you reinforce key concepts like iteration and existence checks in maps, preparing you for more advanced Go topics.
We'll cover the following...
We'll cover the following...
Choose one correct answer.
1.
What is the output of the following code snippet?
capitals := map[string] string {"France":"Paris", "Italy":"Rome", "Japan":"Tokyo" }
fmt.Println(capitals["Tokyo"])
fmt.Println(capitals["Italy"])
fmt.Println(capitals["Paris"])
A.
Rome
B.
Japan
France
C.
Compiler Error
D.
Japan
Rome
France
1 / 4
We hope that you ...