Skip to content

Instantly share code, notes, and snippets.

@sodastsai
Created March 21, 2012 15:11
Show Gist options
  • Select an option

  • Save sodastsai/2148182 to your computer and use it in GitHub Desktop.

Select an option

Save sodastsai/2148182 to your computer and use it in GitHub Desktop.
Indentation
function someFunc() {
// Indent
alert('this is a function');
if (1) {
// Indent on each '{'
alert('2-level indentation');
}
alert('function end');
}
function anotherFunc {
for (var i=0; i<10; i++)
alert("Even if there's no '{', it still need indentation");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment