Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
I prefer #2, cuz of VS Code shows a different icon when using const than when using function, and if I'm not working with my code then I'd only assume I'm dealing with a constant unless the name is clear that this is a function assigned to a constant
But all in all, I hate javascript so whatever gets my shit done lol -
Aiei4596ybased on people i know, the programmers prefer 2 and data scientists prefer 1. also those people who use functional programming may prefer 2.
-
These two examples are NOT the same.
Eventhough a is const, you can change it, thus possibly losing the anonymous function.
The first one is an anonymous function referenced by "a", the other is a named function. -
@irene hmi? That sounds interesting. What type of languages are needed in this field?
Which languages are the most important ones in this field and why?
What made you apply there? -
@irene If you use promises and callbacks correctly, you don't enter callback hell.
Related Rants
there are two kinds of people:
1. const a = () => {}
2. function a() {}
which one are you?
question
style
coding
javascript