O'Reilly logo

JavaScript: 20 Lessons to Successful Web Development by Robin Nixon

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

Images

Looping Sections of Code

image

         To view the accompanying video for this lesson, please visit mhprofessional.com/nixonjavascript/.

In Lesson 10 you learned all about program flow control, branching, and using if(), else, and switch() statements. These are perfect for altering the program flow according to values and expressions, but not so good when you need to repetitively execute a process, such as processing a document a word at a time to find typographical errors.

This is the type of situation where JavaScript’s looping statements come into ...

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