Challenge 2: Write a fetch() Call — Possible Solution ==================================================================== fetch("https://api.example.com/orders/55", { method: "DELETE", headers: { "Authorization": "Bearer abc123" } }) .then(r => r.json()) .then(console.log); WHY THIS WORKS AS AN ANSWER ------------------------------ method: "DELETE" sets the HTTP method — fetch() defaults to GET the same way curl does, so any other method must be stated explicitly in the options object, exactly as -X does for curl. The Authorization header goes inside the headers object, the fetch() equivalent of curl's -H "Authorization: Bearer abc123" — same header name and value, just expressed as a JavaScript object key/value pair instead of a string flag. No body is included, since a DELETE request in this scenario doesn't need one (matching the same assumption made in earlier chapters' DELETE examples). .then(r => r.json()) parses the response body as JSON (assuming the API returns one even for a DELETE — some APIs return an empty body instead, which .json() would fail to parse, worth checking against the real API), and .then(console.log) prints the parsed result directly in the console — the fetch() equivalent of curl printing a response body to the terminal.