refactoring, modules
This commit is contained in:
parent
b8f6d96990
commit
a16814aaf1
112 changed files with 484 additions and 1825 deletions
11
1-js/09-async/03-promise-chaining/02-error-async/task.md
Normal file
11
1-js/09-async/03-promise-chaining/02-error-async/task.md
Normal file
|
@ -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