Join Slack
Powered by
<Kotlin - How to increase value of mutableMap> I w...
# stackoverflow
u
user
03/22/2021, 3:21 PM
Kotlin - How to increase value of mutableMap
I wanna add 1 to a particular item value of mutableMap in Kotlin laguage. Below is what I made. Is there any way to make this code simple? enter code here map[1] = map[1]?.let {it -> it + 1 } ?: 1
Open in Slack
Previous
Next