© Rehan Zaidi 2017

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

6. Functions

Rehan Zaidi

(1)Karachi, Pakistan

This chapter introduces you to the basics of functions and the advantages that they provide. First, you will be shown the different types of methods used for creating functions in JavaScript. Then, you will see how to define functions that return values to the calling program as well as how to specify parameters (arguments) for the defined function.

Functions: An Overview

A function may be simply defined as a set of statements or a subprogram that can be used or called anywhere within the JS program. A function typically has a name, but does not have to have a name, in which case it is called an ...

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.