August 1999
Intermediate to advanced
1488 pages
72h 53m
English
dictionaryobj.Remove(key)
The Remove() method of the Dictionary object removes the key, item pair from the dictionary that matches the key passed into the method. If no match is found, an error is returned. Nothing is returned from this method.
Listing 9.23 uses the Remove() method to remove berry from the dictionary.
<script language="JScript">
<!-- Hide
//Create dictionary
var fruits = new ActiveXObject("Scripting.Dictionary");
//define elements of dictionary
fruits.Add("A","apple");
fruits.Add("B","berry"); fruits.Add("G","grape"); fruits.Add("O","orange"); //Delete berry from dictionary fruits.Remove("B"); ... |
Read now
Unlock full access