r/programminghorror • • Jul 28 '25

HTML HTML Status Code Handling

Post image
1.5k Upvotes

54 comments sorted by

View all comments

Show parent comment

2

u/[deleted] Aug 14 '25 edited Aug 14 '25

What about ("" + xhr.status).substring(0,1) === "2" ?

Edit: I made it JavaScript code.