Skip to content

Instantly share code, notes, and snippets.

@samccone
Created June 12, 2012 20:02
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save samccone/2919791 to your computer and use it in GitHub Desktop.
Save samccone/2919791 to your computer and use it in GitHub Desktop.
JS Style
// CONDITIONALS
if (foo && bar) {
}
if () {
} else {
}
bar && foo();
goo || (function() {
}());
// FUNCTIONS
function bar(zap, foo, bar) {
}
var zap = function(hip, hop) {
}
bar(1, 2, 3);
// VARIABLE DECLARATIONS
var obj = {
bar: zap,
foo: loo,
fruity: zardox
};
var bob = "foo";
var aLongOne = "bar";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment