Mega Code Archive

 
Categories / JavaScript Tutorial / MS JScript
 

Dictionary Items()

Syntax dictionaryobj.Items() The Items() 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.Items())).toArray();     document.write("The array contains:<br>");     for (i in theArray) {       document.write("theArray[",i,"]=",theArray[i],"<br>");     }     -->     </script>     </html>