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


JAVASCRIPT TUTORIALS » MS JScript » Dictionary »

 

Dictionary.Keys()









Syntax








dictionaryobj.Keys()



The Keys() method returns all the items in the dictionary in an array.












<html>
    <script language="JScript">
    <!--
    var fruits = new ActiveXObject("Scripting.Dictionary");

    fruits.Add("A","AA");
    fruits.Add("B","BB");
    fruits.Add("G","GG");
    fruits.Add("O","OO");

    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