minor
This commit is contained in:
parent
ccfd721a23
commit
e50b6cc744
2 changed files with 7 additions and 5 deletions
|
@ -338,8 +338,10 @@ That doesn't work, because JavaScript assumes a semicolon after `return`. That'l
|
||||||
return*!*;*/!*
|
return*!*;*/!*
|
||||||
(some + long + expression + or + whatever * f(a) + f(b))
|
(some + long + expression + or + whatever * f(a) + f(b))
|
||||||
```
|
```
|
||||||
|
|
||||||
So, it effectively becomes an empty return.
|
So, it effectively becomes an empty return.
|
||||||
If we wanted our expression to wrap across multiple lines, we would have to put the opening parenthesis in the same line as the `return` statement as follows:
|
|
||||||
|
If we want our expression to wrap across multiple lines, we can put the opening parentheses in the same line as the `return` statement as follows:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -178,7 +178,7 @@ loadScript("/article/script-async-defer/small.js");
|
||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
Both `async` and `defer` have one common thing: they don't block page rendering. So the user can read page content and get acquanted with the page immediately.
|
Both `async` and `defer` have one common thing: downloading of such scripts doesn't block page rendering. So the user can read page content and get acquanted with the page immediately.
|
||||||
|
|
||||||
But there are also essential differences between them:
|
But there are also essential differences between them:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue