O'Reilly logo

Jump Start JavaScript by Don Nguyen, Ara Pehlivanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5Loops and Jumps

This chapter introduces loop and jump statements. A loop statement is used when we want to repeat some programming statements until a specified condition is reached. A typical example would be to iterate through a list and perform an operation on each member of the list. A jump statement allows code to exit loops. One example is to loop through our to-do list and then break out of the loop upon reaching the first incomplete item. There are various types of jump statements, which we’ll explain as we go along.

Loops are generally associated with a particular style of programming known as imperative programming. Here, the programmer specifies step by step how a program should achieve a particular task. An alternative approach ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required