On the page _"Graceful asynchronous programming with Promises"_, the last note in the _"Running some final code after a promise fulfills/rejects"_ section says
"finally() allows you to write async equivalents to try/catch/finally in async code"
while it should be,
"finally() allows you to write async equivalents to try/catch/finally in sync code"
It depends on how you interpret it.
If you interpret it like this:
"finally() allows you to write async equivalents to async code try/catch/finally"
then yes, it's wrong.
But if you interpret it like this:
"finally() allows you to write async equivalents to try/catch/finally, but in async code"
then it's correct, although a bit redundant and confusing.
I think that this simpler sentence would make it clear enough that try/catch/finally is sync:
"finally() allows you to write async equivalents to try/catch/finally"
Three notes above that one, we can read:
.then()/.catch() blocks in promises are basically the async equivalent of a try...catch block in sync code
I find it very clear in that case, so the wording for the note I opened the issue for would be less confusing if it would follow the same format in my opinion.
Yes, absolutely.
I'm leaving screenshots from the page here so that it's easier for the admins to see it.


I believe I've fixed this now; let me know if you think it needs any more work!
Most helpful comment
I believe I've fixed this now; let me know if you think it needs any more work!