Skip to content

Instantly share code, notes, and snippets.

@vlmonk
Forked from samccone/gist:2919791
Created June 26, 2012 13:41
Show Gist options
  • Save vlmonk/2995846 to your computer and use it in GitHub Desktop.
Save vlmonk/2995846 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