Getting to the middle of the article, I was thinking — “this guy lectures me about async/await and how good it is over promises with the ‘pyramid of doom’ example when he doesn’t even know how to write code with promises”.
But, after reading further, I saw that you do know how to work with promises, you just picked a bad example of promises when comparing to async/await code.
This how the “pyramid of doom” you’ve mentioned should have looked like.
The code doesn’t look way worse than the async/await version of it, yet its fashion is still asynchronous — unlike the async/await version which provides the elegancy of synchronous code.
.catch(err => // catch all);