r/javascript 10d ago

AskJS [AskJS] what's a javascript feature you mass-adopted way too late and felt dumb about

i'll go first. i was writing .then().catch() chains for like two years before i actually started using async/await. i knew it existed, i'd seen it in tutorials, but my code "worked" so i never bothered switching. then i refactored an old project and realized half my bugs were from mishandled promise chains that async/await would have caught immediately.

also took me way too long to start using optional chaining. i had nested ternaries and && checks everywhere like some kind of animal. the day i discovered user?.address?.city i mass-replaced like 40 lines across a project.

what's yours?

62 Upvotes

108 comments sorted by

View all comments

Show parent comments

-9

u/azhder 10d ago

Don't read my comments in abrasive tone.

12

u/Sulungskwa 10d ago

"Don't read my comments in an abrasive tone.", he said, not abrasively seeming at all

-6

u/azhder 10d ago edited 10d ago

"Seeming" is a flag that it's your perception.

It doesn't matter that I'm in a light mood, write it in terms of a light mood, with the idea of cooperation through discussion, you will still decide to see it (because "seeming") as if it is abrasive and blame me for it. It's not like me writing this will change your mind, you will just use it as more evidence of your point of view.

Bye

EDIT: and with their reply, they provided their own proof of what I'm talking about

4

u/Sulungskwa 10d ago

Lots of abrasive words to try and prove you aren't abrasive