mychos wrote:
> ...
> for(i in cookieArray){
> cookieArray2[cookieArray[i].split("=")[0].replace(/ /
> g,"")]=cookieArray[i].split("=")[1].replace(/ /g,"");
> }
> }....
This part is an incorrect use of an Array as an object. Iterating
through an Array with the for...in construct might as well be iterating
through a Boolean with for...in. Prototype adds properties to arrays
such as each() and include() methods.
The for...in line can be easily changed to:
for (var i = 0, length = cookieArray.length; i < length; i++) {
- Ken Snyder
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---