work
This commit is contained in:
parent
57dc058c49
commit
f57be1bbb3
5 changed files with 221 additions and 46 deletions
11
8-async/03-promise-chaining/02-error-async/task.md
Normal file
11
8-async/03-promise-chaining/02-error-async/task.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Error in setTimeout
|
||||
|
||||
How do you think, does the `.catch` trigger? Explain, why?
|
||||
|
||||
```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