Skip to content

Instantly share code, notes, and snippets.

@xulapp
Created April 5, 2011 14:26
Show Gist options
  • Select an option

  • Save xulapp/903691 to your computer and use it in GitHub Desktop.

Select an option

Save xulapp/903691 to your computer and use it in GitHub Desktop.
my coding style
if (cond)
return;
if (cond)
return 'expression';
if (cond)
one();
if (cond) {
one();
two();
}
if (cond)
one();
else
one();
if (cond) {
first()
.second()
.third();
}
if (cond)
first().second().third().better();
var foo = longlonglonglonglonglonglonglong
? one()
: one();
for (var i = 0; i < 10; i++)
one();
for (var i = 0; i < 10; i++)
if (cond)
one();
func(true, true, false, false, null, null, function() { self.one(); });
func(true, true, false, false, null, null, function() {
self.one();
self.two();
});
func(
true, true, false, false, null, null,
function() {
self.one();
self.two();
},
false
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment