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
code check
Picking a random name.
Please suggest some SQL syntax for producing a string based on a group of other "bit" values.
FPDF PDF Generator Support
SQL 2008 R2 setup support files failed on Win 2008 R2
Dreamweaver - error creating new site
Select Query to identify when a customer ID exists during the same time period
How to convert First Function from MS Acess to T-SQL
SBS 2003 – one user receives lots of calendar invitations and meeting approvals/declines
gpupdate problem Windows 7 Professinal 32 bit