MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/62ocys/es2018_first_look_it_changes_everything/dfosj65/?context=3
r/javascript • u/saulorama • Mar 31 '17
120 comments sorted by
View all comments
Show parent comments
7
Some people dislike anonymous functions (cough — Kyle Simpson — cough)
Some people like function hoisting.
¯_ (ツ) _/¯
0 u/[deleted] Apr 01 '17 [deleted] 1 u/[deleted] Apr 01 '17 Wouldn't that use a function before it is being defined? 2 u/kdesign Apr 01 '17 No, because functions are hoisted. It also makes it clear what you export at the beginning of the module so you can quickly discern between what's "private" and what's "public".
0
[deleted]
1 u/[deleted] Apr 01 '17 Wouldn't that use a function before it is being defined? 2 u/kdesign Apr 01 '17 No, because functions are hoisted. It also makes it clear what you export at the beginning of the module so you can quickly discern between what's "private" and what's "public".
1
Wouldn't that use a function before it is being defined?
2 u/kdesign Apr 01 '17 No, because functions are hoisted. It also makes it clear what you export at the beginning of the module so you can quickly discern between what's "private" and what's "public".
2
No, because functions are hoisted. It also makes it clear what you export at the beginning of the module so you can quickly discern between what's "private" and what's "public".
7
u/azangru Apr 01 '17
Some people dislike anonymous functions (cough — Kyle Simpson — cough)
Some people like function hoisting.
¯_ (ツ) _/¯