为什么coffeescript条件赋值在函数调用中不起作用?

时间:2014-10-15 15:54:40

标签: coffeescript

我能做到

fun = if state then "a" else "b"
somefunction(fun, "param")

但是我做不到

somefunction(if state then "a" else "b", "param")
在咖啡1.8.0中

。这有什么好的理由吗?

0 个答案:

没有答案