This commit is contained in:
Ilya Kantor 2017-04-18 00:26:35 +02:00
parent 57dc058c49
commit f57be1bbb3
5 changed files with 221 additions and 46 deletions

View 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);
```