The while Statement
A more general looping structure:
// Compute r = m % n for m,n > 0:
var r = m;
while ( r >= n ) {
r -= n;
}
break and continue in for and while loops are permitted
JavaScript supports recursion as well
Previous slide
Next slide
Back to first slide
View graphic version