var a = 123;
var b = 456;
var c = a || b;
var d = a && b;
console.log(c); //输出123 a || b 等价于 a ? a : b;
console.log(d);//输出456 a && b 等价于 a ? b : a;