Created
August 10, 2013 20:31
-
-
Save michaelrkn/6202011 to your computer and use it in GitHub Desktop.
Revisions
-
michaelrkn created this gist
Aug 10, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ // include a space after most keywords (eg var, if, else, for, return) var foo = "bar"; // include a space around operators foo === "bar"; foo += "qux"; // put a space after most closing parentheses // indent within if statements if (foo === "bar") { alert("baz!"); } // indent within loops for (var i = 0; i < 3; i++) { alert(i); } // indent within functions function doSomething() { alert("do something you fool!"); } // always indent two spaces at a time. never more, never less. // don't include a space between a function and the opening parentheses enclosing its arguments alert("look, no space!");