开发者

In what cases are the Enumerator objects (IE) and the Iterator objects (Fx) really useful?

In what cases should I use those objects instead of an ordinary loop (if the开发者_如何学Pythonre are any such cases)?


I think the Enumerator Object is usefull in server side javascript on a windows based system. You can use it to iterate a Collection that is returned by for example a method of the MS FileSystemObject or a Collection like Request.QueryString. You can't iterate through such collections directly using javascript (not with for ... 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜