I need to set value to a
that depends on a condition.(我需要设置值, a
是取决于一个条件。)
What is the shortest way to do this with CoffeeScript?(使用CoffeeScript执行此操作的最短方法是什么?)
Eg this is how I'd do it in JavaScript:(这就是我在JavaScript中的表现:)
a = true ? 5 : 10 # => a = 5
a = false ? 5 : 10 # => a = 10
ask by evfwcqcg translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…