O'Reilly logo

Inside JavaScript by Steven Holzner

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 3. The JavaScript Language: Loops, Functions, and Errors

The JavaScript Language: Loops, Functions, and Errors

In this chapter, we’re going to build on the work we started in the preceding chapter and continue building our JavaScript foundation. We’ve already taken a look at handling data, operators, and branching statements. Here, we’re going to move up to working with loops, functions, and errors—all powerful parts of your JavaScript arsenal. I’ll get started with loops immediately.

Loops

In JavaScript, loops enable you to execute a series of statements over and over on your data. At first, that might not seem very exciting—what’s the good of executing the same code on your data more than ...

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