This method provides a reference to the receptacle containing the key name. This 'by-reference' access to the key allows the key to be changed. You would not be able to do that if it accessed the key name by value.
Because you are referencing the container of the key, you can use this method as an LValue and assign a new value to the key. This is effectively a key rename mechanism.
If the key does not already exist, like the Item() method, this will create a new named but empty item in the Dictionary.
Prev | Home | Next |
Dictionary.Items() | Up | Dictionary.Keys() |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |