TLDR: Use for...of
instead of forEach()
in asynchronous code.
For legacy browsers, use for...i
or [].reduce()
To execute the promises in parallel, use Promise.all([].map(...))
TypeScript 1 hr 8 mins βββββββββββββββββββββ 58.3% | |
Markdown 14 mins βββββββββββββββββββββ 12.4% | |
JavaScript 11 mins βββββββββββββββββββββ 10.0% | |
JSON 11 mins βββββββββββββββββββββ 9.7% | |
Go 9 mins βββββββββββββββββββββ 7.8% |
Note:
When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.
If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code: