javascript-tutorial / en.javascript.info

Modern JavaScript Tutorial
https://javascript.info
Other
23.33k stars 3.84k forks source link

Wrong Solution #3725

Closed HuyNhay closed 1 month ago

HuyNhay commented 1 month ago

The solution of this task about error handling with promise is wrong. The answer should be YES, because regardless of setTimeout, the executor still throws the error object to the catch method, so it still alert the error (i.e the .catch() is triggered).

iliakan commented 1 month ago

Just tried in console.

image