Added style guide for semicolon after anonymous functions in variables
diff --git a/JavascriptStyleGuide.wiki b/JavascriptStyleGuide.wiki index bfbdb52..4994b4e 100644 --- a/JavascriptStyleGuide.wiki +++ b/JavascriptStyleGuide.wiki
@@ -20,16 +20,23 @@ = Javascript Style Rules = -1. _Semicolons_: *Always*, but not after functions as in: +1. _Semicolons_: *Always*, *not* after functions as in: {{{ -function () { +function foo() { }; }}} -This is unnecessary. +This is unnecessary. But *yes* when you're storing an anonymous function inside a variable like this: + +{{{ + +var foo = function () { +}; + +}}} 2. _Line length_: *80* columns maximum. If you need to break one line, indent it by *2* spaces