From 1a6d30820957b02a2eed8d7cd937f1fb6db7850a Mon Sep 17 00:00:00 2001 From: James Bunt Date: Thu, 24 Apr 2014 11:05:30 +1200 Subject: [PATCH] Add justification and some further reading on using a leading semi colon before an IIFE to the Semicolons section. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3409c68ccd..5e4bdd339c 100644 --- a/README.md +++ b/README.md @@ -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)**