I want to know if there is a clean way to modify a value in a hashmap or create it if it doesn't exist without doing an if block. Example of what i'm currently doing
let dict = {}
if(dict['key']){
dict['key'] += 1
} else {
dict['key'] = 1
}
Want to know if there is a cleaner way to do what I did above.