THT is in early Beta. We welcome contributors & feedback.

Map.remove

remove(key)

Description

Remove the key/value pair for key and return the associated value.

You can call hasKey first to make sure the key exists.

let map = { a: 1, b: 2, c: 3 };

map.remove('b');
//= 2

map.remove('Z');
//= Error! :(

print(map);
//= { a: 1, c: 3 }