jashkenas--coffeescript/documentation/examples/expressions.coffee

10 lines
187 B
CoffeeScript

grade = (student) ->
if student.excellentWork
"A+"
else if student.okayStuff
if student.triedHard then "B" else "B-"
else
"C"
eldest = if 24 > 21 then "Liz" else "Ike"