Mega Code Archive

 
Categories / JavaScript Tutorial / MS JScript
 

Dictionary RemoveAll()

The RemoveAll() method removes all key, item pairs from the dictionary. Nothing is returned from this method. <html>     <script language="JScript">     <!--     var fruits = new ActiveXObject("Scripting.Dictionary");     fruits.Add("A","apple");     fruits.Add("B","berry");     fruits.Add("G","grape");     fruits.Add("O","orange");     fruits.RemoveAll();     theArray = (new VBArray(fruits.Keys())).toArray();     document.write("The array contains:<br>");     for (i in theArray) {       document.write("theArray[",i,"]=",theArray[i],"<br>");     }     -->     </script> </html>