refactor promise, geneerators, global object
This commit is contained in:
parent
be9c5a7b5f
commit
2ee2751216
69 changed files with 900 additions and 643 deletions
|
@ -0,0 +1,11 @@
|
|||
# Error in setTimeout
|
||||
|
||||
What do you think? Will the `.catch` trigger? Explain your answer.
|
||||
|
||||
```js
|
||||
new Promise(function(resolve, reject) {
|
||||
setTimeout(() => {
|
||||
throw new Error("Whoops!");
|
||||
}, 1000);
|
||||
}).catch(alert);
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue