I think that your example after "If you make the same function async, it would give you a failed promise." should have async in code. Both examples are the same.
The next example replaces throw with Promise.reject, both in non-async functions on purpose. The takeaway is that throw is only consistently transformed to failed promises in async functions, which is a detail that is easy to miss. Promise.reject is more explicit and works everywhere.
I think that your example after "If you make the same function async, it would give you a failed promise." should have async in code. Both examples are the same.
The next example replaces throw with Promise.reject, both in non-async functions on purpose. The takeaway is that throw is only consistently transformed to failed promises in async functions, which is a detail that is easy to miss. Promise.reject is more explicit and works everywhere.
That's right, sorry didn't nice that. I was looking at missing async keyword. Good article.