🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #189

Re: Using for ... in with arrays

#189
From: Fred_Goldman
Date: Tue, 31 Mar 2009 22:46
10 lines
977 bytes
It makes sense, because an array is an object and the properties of the 
array are the index number of the array element.

Try this:

var myArray = new Array(50)
myArray[25] = 3
for (j in myArray) {
   $.writeln(j);
}
Technical Details
Message-ID: <A7B35494A7B59E42235CE84D498A2A05@in.webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
References: <59b87616.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,709551d954315a95
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Fred_Goldman@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: Using for ... in with arrays
Message-ID: <A7B35494A7B59E42235CE84D498A2A05@in.webcrossing.la2eafNXanI>
Date: Tue, 31 Mar 2009 15:46:06 -0700
References: <59b87616.-1@webcrossing.la2eafNXanI>
Lines: 11
User-Agent: Thunderbird 2.0.0.21 (Windows/20090302)
X-Antivirus: avast! (VPS 090330-0, 03/30/2009), Outbound message
X-Antivirus-Status: Clean
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit