Nested conditionals
var a = true;
var b = false;
var c;
//shorthand
var shorthand = a && (c || b);
//long way
var longway;
if (a) {
if(c) {
longway = true;
} else if (b) {
longway = true;
} else {
longway = false;
}
} else {
longway = false;
}
console.log('shorthand = ', shorthand);
console.log('longway = ', longway);INFO