Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "Two requests are independent. Which form starts both before waiting and preserves both results?" on CodeWiki (https://codewiki.com/practice/mcq/javascript/checkpoint-3/checkpoint-3-concurrent-await/).
Context (verbatim from the page):
"""
Two requests are independent. Which form starts both before waiting and preserves both results?
`const [user, prefs] = await Promise.all([fetchUser(), fetchPrefs()])`
`const user = await fetchUser(); const prefs = await fetchPrefs()`
`const [user, prefs] = await Promise.race([fetchUser(), fetchPrefs()])`
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in JavaScript. Where you are unsure, say so.