Version: v0.7.1 - Beta.  We welcome contributors & feedback.

Map.remove

remove($key) -> any

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('X')
//= ''

See Also