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
Logitech Monitor Showing VERY FEW Resolution Options in Win 7
JavaScript: Get first jpg image - IE Problem
sort pivot table
connect to sql database using php
Adding Column in a query
Qry and a combo box & column(1)
php changing max file upload size
Display data from fields in multiple tables on a single report
Thin lines between images in FireFox for Mac
Routing between vlan