AtEnd functions in JavaScript

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.