logo       

Prototype is spamming my arrays!: msg#00003

lang.ruby.rails.spinoffs

Subject: Prototype is spamming my arrays!


Hi all, when I want to interate through an array, all those pesky Prototype
functions get in my way!

When I do this:
---------------------

r="";
for(x in new Array()) {
r+="var: "+x+", val: "+ (new Array())[x]+"\n";
}
alert(r);


---------------------
I get a giant alert window with loads of functions printed out.
Is this a bug, or is there a better way to iterate over arrays?
__________________________________________________________________________
Erweitern Sie FreeMail zu einem noch leistungsstarkeren E-Mail-Postfach!

Mehr Infos unter http://freemail.web.de/home/landingpad/?mc=021131


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise