Chapter 3. 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 ...
Get Inside JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.