You can use catch on a promise and it will return another promise.
You can use await on a promise to wait for the result.
So everything is ok with the example, even if with the await keyword you can use a try/catch block to catch the error rejected by a promise.
You can use catch on a promise and it will return another promise.
You can use await on a promise to wait for the result.
So everything is ok with the example, even if with the await keyword you can use a try/catch block to catch the error rejected by a promise.
Thank you :DD