Ternary operator – does not work in coffeescript…
Well today I had little surprise with ternary operator in coffeescript (CS)
variable = condition ? doStuff() : null
in CS it doesnt work properly, instead of this use:
variable = if condition then doStuff() else null
This is funny thing in that case, while CS should short or make it easier to write JS – in this situation… you have to write more code 馃槈
Najnowsze komentarze