Skip to content

Instantly share code, notes, and snippets.

@sajjadyousefnia
Created April 8, 2018 05:55
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/fbe965e1bc7fcc6fde06304ae28838e5 to your computer and use it in GitHub Desktop.
Save sajjadyousefnia/fbe965e1bc7fcc6fde06304ae28838e5 to your computer and use it in GitHub Desktop.
val currenciesMutableMap: MutableMap<String, String> = mutableMapOf("Naira" to "Nigeria", "Dollars" to "USA", "Pounds" to "UK")
println("Countries are ${currenciesMutableMap.values}") // Countries are [Nigeria, USA, UK]
println("Currencies are ${currenciesMutableMap.keys}") // Currencies are [Naira, Dollars, Pounds]
currenciesMutableMap.put("Cedi", "Ghana")
currenciesMutableMap.remove("Dollars")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment