Add justification and some further reading on using a leading semi colon before an IIFE to the Semicolons section.

This commit is contained in:
James Bunt
2014-04-24 11:05:30 +12:00
parent 731ae106bc
commit 1a6d308209

View File

@@ -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)**