Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
bpicolo
· 12y ago · 0 comments
You lose the return value over (function(){})(). That's an awful recommendation.
Comments
[–]
_harry
12y ago
Yup! We only recommend !function(){}(); for a module where you just need your function to run. If you rely on the return value use (function(){})(); or (function(){}()); (more on this:
https://github.com/airbnb/javascript/issues/21
)