MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/node/comments/1c3uaey/javascript_functions_4_ways/kzpvh8e/?context=3
r/node • u/hoonerismsmeen • Apr 14 '24
79 comments sorted by
View all comments
38
As someone who doesn't really use JavaScript much, what was wrong with the function declaration form and why are the rest needed? I learned JS before the newer ways existed and never really kept up.
82 u/travybongos69 Apr 14 '24 Arrow functions don't have their own this which can be useful at times 2 u/Think_Discipline_90 Apr 15 '24 "At times" try 99% of cases.The only times I use oldschool function declaration is if I want typed overloads 3 u/[deleted] Apr 15 '24 edited Apr 14 '26 Data Brokers don't stand a chance because I mass delete all of my content using Redact - No AI training on my data, thank you very much.cooing punch encouraging fuzzy longing squash bright fact thought lock
82
Arrow functions don't have their own this which can be useful at times
this
2 u/Think_Discipline_90 Apr 15 '24 "At times" try 99% of cases.The only times I use oldschool function declaration is if I want typed overloads 3 u/[deleted] Apr 15 '24 edited Apr 14 '26 Data Brokers don't stand a chance because I mass delete all of my content using Redact - No AI training on my data, thank you very much.cooing punch encouraging fuzzy longing squash bright fact thought lock
2
"At times" try 99% of cases.
The only times I use oldschool function declaration is if I want typed overloads
3 u/[deleted] Apr 15 '24 edited Apr 14 '26 Data Brokers don't stand a chance because I mass delete all of my content using Redact - No AI training on my data, thank you very much.cooing punch encouraging fuzzy longing squash bright fact thought lock
3
Data Brokers don't stand a chance because I mass delete all of my content using Redact - No AI training on my data, thank you very much.
cooing punch encouraging fuzzy longing squash bright fact thought lock
38
u/damnNamesAreTaken Apr 14 '24
As someone who doesn't really use JavaScript much, what was wrong with the function declaration form and why are the rest needed? I learned JS before the newer ways existed and never really kept up.