Skip to content

Instantly share code, notes, and snippets.

@Neppord
Created March 2, 2017 12:15
Show Gist options
  • Save Neppord/613860dc04238f7afd40d7d185a62932 to your computer and use it in GitHub Desktop.
Save Neppord/613860dc04238f7afd40d7d185a62932 to your computer and use it in GitHub Desktop.
my own notes in discussing style guides
const x = true || false, y = 1, z = 2;
function () {
return x ? y : z;
}
function () {
if (x) {
return y;
}
return z;
}
function () {
let r = z;
if (x) {
r = y;
}
return r;
}
function () {
let r;
if (x) {
r = y;
} else {
r = z;
}
return r;
}
function () {
if (x) {
return y;
} else {
return z;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment