Version: v0.6.0 - Beta.  We welcome contributors & feedback.  THanks!

Map.remove

remove($key)

Description

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

If the key does not exist, it will return an empty string ('') or whatever is set with the default method.

$map = { a: 11, b: 22, c: 33 };

$map.remove('b');
//= 22

print($map);
//= { a: 11, c: 33 }

$map.remove('Z');
//= ''

See Also