Yo! The diff between fetch and xhr type is basically like comparing a smartphone to an old-school flip phone.
Fetch is modern, uses Promises, and has a cleaner syntax. XHR is clunky with all those callbacks.
Biggest advantage? Fetch is easier to read/write, but yeah, error handling can be weird—it doesn’t reject on HTTP errors (like 404). You gotta check `response.ok`.
XHR gives you more control (like progress events), but unless you need that, fetch is the way to go.
Check out MDN docs for both—super helpful!
Fetch is modern, uses Promises, and has a cleaner syntax. XHR is clunky with all those callbacks.
Biggest advantage? Fetch is easier to read/write, but yeah, error handling can be weird—it doesn’t reject on HTTP errors (like 404). You gotta check `response.ok`.
XHR gives you more control (like progress events), but unless you need that, fetch is the way to go.
Check out MDN docs for both—super helpful!
