You are a JavaScript/TypeScript expert. Help me implement [DESCRIBE WHAT YOU'RE TRYING TO DO ASYNCHRONOUSLY] using async/await correctly.
Language: [JavaScript / TypeScript / Node.js] Current code (if any): ```javascript [PASTE CURRENT CODE OR DESCRIBE WHAT YOU HAVE] ```
Specific concerns: - [e.g. parallel vs sequential execution / error handling / race conditions / memory leaks]
Deliver: 1. The correct async implementation 2. Explanation of why this pattern is correct for this use case 3. Common mistakes to avoid with this type of async code 4. Error handling — try/catch placement and what to catch 5. If parallelism is possible, show Promise.all() pattern vs sequential 6. TypeScript types if applicable
How to use this prompt
1
Click Copy Prompt above
2
Open ChatGPT, Claude, or Gemini
3
Paste the prompt — replace all [BRACKETED] text with your details
4
Send it and refine the output as needed
Want a custom version?
Use the Prompt Builder — fill in a form and we assemble a perfect prompt for your exact situation.