Skip to content

Instantly share code, notes, and snippets.

@sajjadyousefnia
Created April 7, 2018 12:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sajjadyousefnia/c6992956f7cafae82552ff6881c05acc to your computer and use it in GitHub Desktop.
Save sajjadyousefnia/c6992956f7cafae82552ff6881c05acc to your computer and use it in GitHub Desktop.
val callingCodesMap: Map<Int, String> = mapOf(234 to "Nigeria", 1 to "USA", 233 to "Ghana")
for ((key, value) in callingCodesMap) {
println("$key is the calling code for $value")
}
print(callingCodesMap[234]) // Nigeria
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment