Practice using Maps on your own, through a hands-on challenge.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4736-programming-in-kotlin/lessons/34
Practice using Maps on your own, through a hands-on challenge.
Since the instructions say โGiven a map in the above formatโ we can assume that the city and state keys already exist and use:
fun printPlayer(player : Map<String, String>) {
println("${player["name"]} lives in ${player["city"]}, ${player["state"]}")
}
@dizzy49 I like your implementation.