Microsoft
Software
Hardware
Network
Question : JavaScript: i++ in a loop
Because i++ adds 1, I have to start with -1 for my loop to work:
1: 2: 3: 4:
var i=-1; while(i++<myArray.length-1){ alert(i); }
That code works but it seems awkward. Is there a way better to do this, so that I can start with:
var i = 0;
Related Solutions:
JavaScript: Alert when checkbox value changed
Answer : JavaScript: i++ in a loop
for ( var i = 0; i < myArray.length; i++ ) {
alert( i );
}
Is the common idiom
Random Solutions
Add non sqldatasource listitems to asp:dropdown linked to a sqldatasource
Make button click occur onload
Cisco 2950G Switch - Port Mirroring
Exchange 2007 Active/Active/Passive configuration
Compaq EVO W6000 - 2 dual core Processors?
turning dynamic URL's into Static URLs in ASP classic
how many users can connect to Vostro 230s SlimTower Genuine Windows 7 Professional?
How do I create an oval rectangular box with two colors as borders as shown in the attachment.
Add WMI Query to Existing VBscript
sql query with case