AtEnd functions in JavaScript
Is the AtEnd method: Returns a Boolean value that indicates whether the enumeration operator is at the end of the collection.
How to use it is
Myenum.atend ()
Note: The mandatory option MyEnum parameter is any enumerator object. The AtEnd method returns True if the current item is the last in the collection, or if the collection is empty, or if the current item is not defined. Otherwise, false is returned. In the following code, the AtEnd method is used to determine whether the end of a list of drives is reached:
function Showdrivelist () {http://map.sogou.com/poi/1_D1000058002509.htm
var fso, S, N, E, x;
FSO = new ActiveXObject ("Scripting.FileSystemObject");
E = new Enumerator (FSO. Drives);
s = "";
for (;!e.atend (); E.movenext ())
{
x = E.item ();
s = s + x.driveletter;
s + = "-";
if (X.drivetype = = 3)
n = x.sharename;
else if (X.isready)
n = x.volumename;
Else
n = "[Drive not Ready]";
s + = n + "
";
}
return (s);
}
AtEnd functions in JavaScript