© Rehan Zaidi 2017

Rehan Zaidi, JavaScript Essentials for SAP ABAP Developers, 10.1007/978-1-4842-2220-1_4

4. Control Structures in JavaScript

Rehan Zaidi

(1)Karachi, Pakistan

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.

Block Statement

A block is used for grouping a set of statements. ...

Get JavaScript Essentials for SAP ABAP Developers: A Guide to Mobile and Desktop Application Development 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.