Enumerator.item() : Enumerator : MS JScript JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » MS JScript » Enumerator »

 

Enumerator.item()







The item() method returns the element that the enumerator is pointing to in the collection. If the collection is empty or undefined, undefined is returned.












<html>
    <h1>Drive Letters and drive types:</h1>
    <script language="JScript">
    <!--
    var fileSysObj = new ActiveXObject("Scripting.FileSystemObject");
    var en = new Enumerator(fileSysObj.Drives);

    for (;!en.atEnd();en.moveNext())
    {
      document.write("Drive ",en.item().DriveLetter);
      document.write(" is of type ",en.item().DriveType,"<br>");
    }
    -->
    </script>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo MS JScript
» Enumerator