[guide] fix a few IIFE examples

This commit is contained in:
Jordan Harband
2016-01-19 10:15:36 -08:00
parent 018dd6e359
commit fb65b9ae04

View File

@@ -1936,13 +1936,13 @@ Other Style Guides
(() => {
const name = 'Skywalker';
return name;
})();
}());
// good (guards against the function becoming an argument when two files with IIFEs are concatenated)
;(() => {
const name = 'Skywalker';
return name;
})();
}());
```
[Read more](http://stackoverflow.com/questions/7365172/semicolon-before-self-invoking-function/7365214%237365214).