7. JavaScript: Functions

OBJECTIVES

In this chapter you’ll learn:

• How to create new functions.

• How to pass information between functions.

• Simulation techniques that use random number generation.

• How the visibility of identifiers is limited to specific regions of programs.

• To use JavaScript’s global functions.

• To use recursive functions.

• To compare recursion vs. iteration.

Form ever follows function.Louis Sullivan

E pluribus unum. (One composed of many.)Virgil

O! call back yesterday, bid time return.William Shakespeare

Call me Ishmael.Herman Melville

When you call me that, smile.Owen Wister

Get JavaScript™ for Programmers: Deitel 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.