/documentation/coffee/expressions.coffee

http://github.com/jashkenas/coffee-script · CoffeeScript · 9 lines · 8 code · 1 blank · 0 comment · 7 complexity · db21576f17da75dfd8b5bd27d8a3c397 MD5 · raw file

  1. grade = (student) ->
  2. if student.excellentWork
  3. "A+"
  4. else if student.okayStuff
  5. if student.triedHard then "B" else "B-"
  6. else
  7. "C"
  8. eldest = if 24 > 21 then "Liz" else "Ike"