Parameter (Definition)

The formal description of a function interface.

The arguments that a function expects to be passed when it is called are described as a set of formal parameters when it is declared.

The parameters are called arguments from within the function when it is executed.

Since JavaScript is weakly data-typed, you do not need to specify the data type of the parameters in the function declaration. Nor are the arguments tested for compliance with any data type when the function is invoked. Rather the values of any arguments are coerced or cast as they are used according to the context in which they are referred to. This makes it very important that you take care with the type and value of parameters you are passing to functions. In particular with numeric and string values.

See also:Argument, Argument list, Arguments object, Definition, Function, Function object, function( ... ) ..., Function.arguments[], Reserved word, Scope chain