O'Reilly logo

Modern JavaScript: Develop and Design by Larry Ullman

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

5. Using Control Structures

Programming is a matter of taking actions with data. The previous chapter introduced the basics of data—simple variables—and this chapter covers the information you need to know in order to dynamically take action. Primarily consisting of conditionals and loops, control structures are a programmatic way to either execute statements only under certain situations or to execute statements repeatedly for a certain number of times. Along the way, you’ll learn most of JavaScript’s remaining operators. (Chapter 2, JavaScript in Action, snuck in a couple of conditionals and operators, but this chapter teaches the bulk of them in full detail.)

Basics of Conditionals

JavaScript has the standard conditionals that exist in most ...

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