3 ms·
Fortunately JavaScript is a flexible enough language that you don't only have to use the primitives it provides. Promises (which were pure JS before they were
by jackweirdy 10y ago
Fortunately JavaScript is a flexible enough language that you don't only have to use the primitives it provides.
Promises (which were pure JS before they were ever added to the language) are a more-composable structure for reasoning about concurrency. I don't think I've put more than one line of callback-style code into production per month.
- Klathmon 10y agoAnd async/await are such a game changer its amazing. I finally bit the bullet and tried it even though it's still not final syntax, it simplified most of my code while keeping the execution exactly the same. It really is a night and day difference.