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
How do I subclass in VB6 to capture user left mouse event on the title bar?
SQL Select Query Against Static table
Query based on date range and totals.
drop index does not work for unique keys
How do I replace "(" using C# regex
Force feeding data to an ODD page number
Use NET start
mysql sww the duplicate on colum1 colum2 colum3
Excel Pivot Table "bug"?
run this vbs script as local admin of remote computer