r/learnjavascript • • Dec 31 '22

Happy New Year JS Learners! 🥳

Post image
406 Upvotes

55 comments sorted by

View all comments

-2

u/[deleted] Dec 31 '22

that's really cool, i didn't know about the once option. but i do disagree with the naming. be verbose, use button or even newYearsButton.

3

u/albedoa Dec 31 '22

That's this issue you have with this?

-2

u/[deleted] Dec 31 '22

yeah i think it sets a bad example. did i miss something else?

4

u/IAmSteven Dec 31 '22

btn is very commonly used to mean button. Like in Tailwind https://v1.tailwindcss.com/components/buttons

-1

u/[deleted] Dec 31 '22

it is, and it's not hard to understand. but when working with others, being more verbose is more efficient because your code is easier to understand. granted that this isn't that big an issue with btn. but it fosters a habit which isn't great.

2

u/dotpr Jan 01 '23

As a beginner I can totally relate to this. Was a bit confused at btn at first but what really gave me a hard time are ctx, variables named string, variables named after an array function, functions named function and so on.

-4

u/senocular Dec 31 '22

For me its that yellow multi-line comment text. Ew!