Skip to Main Content
Coding with JavaScript For Dummies
book

Coding with JavaScript For Dummies

by Chris Minnick, Eva Holland
May 2015
Beginner content levelBeginner
360 pages
6h 39m
English
For Dummies
Content preview from Coding with JavaScript For Dummies

Chapter 7

Getting Functional

In This Chapter

arrow Writing functions

arrow Documenting functions

arrow Passing parameters

arrow Returning values

arrow Organizing programs with functions

“I write as a function. Without it I would fall ill and die. It’s much a part of one as the liver or intestine, and just about as glamorous.”

— Charles Bukowski

Functions help you reduce code repetition by turning frequently used bits of code into reusable parts. In this chapter, you write some functions and use them to make otherwise tedious tasks easy and fun!

ontheweb Don’t forget to visit the website to check out the online exercises relevant to this chapter!

Understanding the Function of Functions

Functions are mini programs within your programs. Functions serve to handle particular tasks within the main program that may be required multiple times by different parts of the program.

If you’ve read any of the preceding chapters, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

HTML5 Programming with JavaScript For Dummies

HTML5 Programming with JavaScript For Dummies

John Paul Mueller
JavaScript For Kids For Dummies

JavaScript For Kids For Dummies

Chris Minnick, Eva Holland

Publisher Resources

ISBN: 9781119056072Purchase book