August 1999
Intermediate to advanced
1488 pages
72h 53m
English
dictionaryobj.RemoveAll()
The RemoveAll() method of the Dictionary object removes all key, item pairs from the dictionary. Nothing is returned from this method.
Listing 9.24 uses RemoveAll() to remove items 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 all items from the dictionary
fruits.RemoveAll();
//Hide End -->
</script>
|
Read now
Unlock full access