Merge pull request #2423 from lumosmind/patch-56
parameters are also local variables
This commit is contained in:
commit
468e355288
1 changed files with 1 additions and 1 deletions
|
@ -273,7 +273,7 @@ We covered three ways to create a function in JavaScript:
|
|||
```
|
||||
|
||||
|
||||
- Functions may have local variables: those declared inside its body. Such variables are only visible inside the function.
|
||||
- Functions may have local variables: those declared inside its body or its parameter list. Such variables are only visible inside the function.
|
||||
- Parameters can have default values: `function sum(a = 1, b = 2) {...}`.
|
||||
- Functions always return something. If there's no `return` statement, then the result is `undefined`.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue