February 2008
Beginner
416 pages
9h 53m
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, that can be called from elsewhere within a JavaScript program. Functions can accept arguments or input values that are passed into the function. Within a function, those arguments passed into the function can be acted upon and then passed back out of the function through a return value.
Functions are perfect for when you have something that needs to happen multiple times within a program. Rather ...
Read now
Unlock full access