Control Structures in JavaScript
Rehan Zaidi · Apress eBooks · 2017
This chapter describes the various control structures in the JS language and demonstrates how to use them to fulfill requirements. The chapter begins with an overview of the block statements supported in JavaScript. Next, the if…else and the switch statements are covered in detail. You will then be introduced to the various types of loops supported in JavaScript, including the for and while loops, and given demo programs showing how to execute them. The chapter wraps up with brief coverage of the LABEL statement. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.