To handle a promise rejection, you pass a callback to the catch() function. Let's add some basic error handling to our code: function doSomethingAsync(){ return ...
確定! 回上一頁