6Repeating actions in programs
What you will learn
In the last chapter, you learned how a program can make decisions and change its behavior according to the data that it is given. In this chapter, you are going to discover how to make a program repeat a sequence of actions using the JavaScript loop constructions. Along the way, we’re going to explore some new features of HTML and JavaScript. We are also going to discover some ways that programs can go wrong and how good design can reduce the chances of a program failing.
Get Begin to Code with 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.