Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Loops ====== ===== for ===== <code javascript> for (var i = 0; i < someArray.length; i++){ // do something } </code> ===== for/in ===== * for/in is used to loop through all properties of an object, NOT an array <code javascript> for (var x in someObject){ document.write(x + " is " + someObject[x] + "\n"); } </code> docs/programming/javascript/loops.txt Last modified: 2008/08/03 00:25by 127.0.0.1