mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 23:37:55 -05:00
Add justification and some further reading on using a leading semi colon before an IIFE to the Semicolons section.
This commit is contained in:
@@ -907,13 +907,15 @@
|
||||
return name;
|
||||
})();
|
||||
|
||||
// good
|
||||
// good (guards against the function becoming an argument when two files with IIFEs are concatenated)
|
||||
;(function() {
|
||||
var name = 'Skywalker';
|
||||
return name;
|
||||
})();
|
||||
```
|
||||
|
||||
[Read more](http://stackoverflow.com/a/7365214/1712802).
|
||||
|
||||
**[⬆ back to top](#table-of-contents)**
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user