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(...))
YAML 1 hr 23 mins ████▋░░░░░░░░░░░░░░░░ 22.2% | |
Markdown 1 hr 11 mins ███▉░░░░░░░░░░░░░░░░░ 18.9% | |
HTML 1 hr 7 mins ███▋░░░░░░░░░░░░░░░░░ 17.9% | |
Other 1 hr 6 mins ███▋░░░░░░░░░░░░░░░░░ 17.7% | |
Bash 47 mins ██▋░░░░░░░░░░░░░░░░░░ 12.6% |
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: