- Browsers require very detailed instructions about whatwe want them to do. Therefore, complex scripts can runto hundreds (even thousands) of lines. Programmers usefunctions, methods, and objects to organize their code.This chapter is divided into three sections that introduce: 1.FUNCTIONS & Methodes 2.OBJECTS 3.BUILT-IN METHODS
- Functions let you group a series of statements together to perform a specific task. If different parts of a script repeat the same task, you can reuse the function (rather than repeating the same set of st atements).
- Declaring Function
2. Calling a Function
3. Declaring Function that need information
4. Calling Function that need information
5. Getting a single value out of a Function
6- Getting a multiple value out of a Function

- Expressions produce a value. They can be used where values are expected. If a function is placed where a browser expects to see an expression, (e.g., as an argument to a function), then it gets treated as an expression.
- This way of writing a function is used in several different situations. Often functions are used to ensure that the variable names do not conflict with each other (especially if the page uses more than one script).
