In what cases should I use those objects instead of an ordinary loop (if there are any such cases)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think the Enumerator Object is usefull in server side javascript on a windows based system. You can use it to iterate a
Collectionthat is returned by for example a method of the MSFileSystemObjector aCollectionlikeRequest.QueryString. You can’t iterate through such collections directly using javascript (not withfor ... in).I’m under the impression that Iterators are fairly new, not usable in all browsers and can be used to iterate through arrays, xml trees or ranges.