谁能告诉我在定义对象之前使用三元运算符检查对象是否已经存在的原因?
var message = message || "hello",
messageOverwritten = "Variable wasn't overwritten",
messageOverwritten = messageOverwritten || "Variable wasn overwritten";
console.log( message );
console.log( messageOverwritten );
/*
* Output
*
* -> hello
* -> Variable wasn't overwritten
*/