minor
This commit is contained in:
parent
fc66b43ce3
commit
b7a0591007
3 changed files with 8 additions and 18 deletions
|
@ -248,8 +248,6 @@ We covered three ways to create a function in JavaScript:
|
|||
};
|
||||
```
|
||||
|
||||
Function expressions can have a name, like `sum = function name(a, b)`, but that `name` is only visible inside that function.
|
||||
|
||||
3. Arrow functions:
|
||||
|
||||
```js
|
||||
|
@ -274,13 +272,7 @@ We covered three ways to create a function in JavaScript:
|
|||
- 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`.
|
||||
|
||||
|
||||
| Function Declaration | Function Expression |
|
||||
|----------------------|---------------------|
|
||||
| visible in the whole code block/script | created when the execution reaches it |
|
||||
| | can have a name, visible only inside the function |
|
||||
|
||||
More: see <info:function-basics>, <info:function-expressions-arrows>.
|
||||
Details: see <info:function-basics>, <info:function-expressions-arrows>.
|
||||
|
||||
## More to come
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue