Chapter 8. JavaScript: Control Statements II

 

Not everything that can be counted counts, and not every thing that counts can be counted.

 
 --Albert Einstein
 

Who can control his fate?

 
 --William Shakespeare
 

The used key is always bright.

 
 --Benjamin Franklin
 

Intelligence ... is the faculty of making artificial objects, especially tools to make tools.

 
 --Henri Bergson
 

Every advantage in the past is judged in the light of the final issue.

 
 --Demosthenes

OBJECTIVES

In this chapter you will learn:

  • The essentials of counter-controlled repetition

  • To use the for and do...while repetition statements to execute statements in a program repeatedly.

  • To perform multiple selection using the switch selection statement.

  • To use the break and continue program-control statements ...

Get Internet & World Wide Web: How to Program, Fourth Edition 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.