Lasso Soft Inc. > Home

[ map->remove ]

Method

[map->remove] removes an item from the map by key. Accepts a single parameter identifying the key of the item to be removed.

  • Syntax
map->remove( key )
Examples
  • Beginner

To remove an element from a map:

Use the [map->remove] method. The following example removes the value for the key 'red' from the map leaving only the values for the keys 'blue' and 'green.'

Code

var (colours = map( 'red'='#ff0000',
                     'green' = '#00ff00',
                     'blue' = '#0000ff',
                     'grey' = '#aaaaaa') )

$colours->remove('red')

Result

map(blue = #0000ff, green = #00ff00, grey = #aaaaaa)

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft