An argument is a value supplied when a function is invoked; a parameter is the variable named in the function definition. Arguments are assigned to parameters in order. section 5.4
When the argument and parameter lists differ:
- Extra arguments are not bound to parameter names; parameters without supplied arguments evaluate as undefined. section 5.4 section 5.6
- Rest parameters collect remaining arguments, while default parameters supply values when none are provided. section 5.6
Extra arguments
With `function practice(ninja, weapon, technique) {}`, the call `practice("Yoshi", "sword", "shadow sword", "katana")` binds the first three values to the named parameters; `"katana"` is extra. section 5.4
A function can be an argument
`useless(getText)` passes a function as an argument. Inside `useless`, calling `ninjaCallback()` invokes that function. section 5.2.2
Figure 5.6 Arguments are assigned to function parameters in the order specified. Excess arguments aren’t assigned to any parameters.
Use the figure to see positional assignment and what happens to an excess argument. section 5.4





