3 ms·
You lose the return value over (function(){})(). That's an awful recommendation.
by bpicolo 13y ago
You lose the return value over (function(){})(). That's an awful recommendation.
- _harry 13y agoYup! 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 https://github.com/airbnb/javascript/issues/21)