Dictionary.RemoveAll() : Dictionary : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » Dictionary »

 

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>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» Dictionary