var str = 0;
//var str = '';
//var str = null;
//var str = undefined;
//var str = NaN;
//var str;//相当于var str = undefined;
var second = 'second';
console.log(str || second);//5种情况都是second
var str = 0;
//var str = '';
//var str = null;
//var str = undefined;
//var str = NaN;
//var str;//相当于var str = undefined;
var second = 'second';
console.log(str || second);//5种情况都是second