June 2013
Beginner
482 pages
11h 16m
English
After reading this chapter, you’ll be able to
Understand the purpose of functions in JavaScript.
Define your own functions.
Call functions and receive data back from them.
Understand some of the built-in functions in JavaScript.
A JavaScript function is a collection of statements, either named or unnamed (anonymous), that can be called from elsewhere within a JavaScript program. Functions can accept arguments, which are input values passed into the function. Within a function, those arguments passed into the function can be acted upon and the results returned to the caller of the function via a return value.
Functions are perfect when you have something that needs to happen multiple times within ...
Read now
Unlock full access