Loops


while

while (I < total) { 
   i++
}


do while

do { 
   i++
} while (I < total)



for

for (i=0; I < total. i++) { 
}


for in

var people = ["steve","john","people"]; 
for (i in people) {
   alert(people[i]);
}




© 2017 Better Solutions Limited. All Rights Reserved. © 2017 Better Solutions Limited

PrevNext