阅读背景:

为什么不||似乎在JavaScript中作为coalesce / default运算符工作?

来源:互联网 

I've seen a couple web pages say that "a = b || 'blah'" should assign 'blah' to a if b is undefined or null. But if I type that into Firebug or use it in code, it complains that b is not defined, at list on FF3/win. Any hints?I've seen a couple web pages say that "a = b ||




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: