Challenge 3 — Solution Task: Write a function that checks a fetch Response object's status and, if it's 429, logs "Rate limited — backing off" and waits 2 seconds (using a Promise + setTimeout) before returning a retry signal; otherwise it returns the response's parsed JSON normally. Test it with a mocked response object of { status: 429 }. async function handleResponse(response) { if (response.status === 429) { console.log("Rate limited — backing off"); await new Promise(resolve => setTimeout(resolve, 2000)); return { retry: true }; } return response.json(); } const mockResponse = { status: 429 }; handleResponse(mockResponse).then(result => { console.log(result); }); Expected output (after a 2-second pause): Rate limited — backing off { retry: true } Notes: - The mocked response object only has a status field, which is all this function actually needs to check — a real fetch Response object would have a json() method too, but that's deliberately never called on the 429 path, since it isn't needed there. - new Promise(resolve => setTimeout(resolve, 2000)) is the standard way to create a plain "wait this long" delay that works with await — there's no built-in sleep() function in JavaScript, so this pattern fills that gap. - A real implementation would call handleResponse again after the delay (using the { retry: true } signal to decide whether to re-fetch), which this challenge doesn't implement, but the function's return value is designed to support that next step.