/documentation/js/expressions.js

http://github.com/jashkenas/coffee-script · JavaScript · 18 lines · 15 code · 2 blank · 1 comment · 6 complexity · b67b469a9a5714ac706e6c24ab48617a MD5 · raw file

  1. // Generated by CoffeeScript 1.10.0
  2. var eldest, grade;
  3. grade = function(student) {
  4. if (student.excellentWork) {
  5. return "A+";
  6. } else if (student.okayStuff) {
  7. if (student.triedHard) {
  8. return "B";
  9. } else {
  10. return "B-";
  11. }
  12. } else {
  13. return "C";
  14. }
  15. };
  16. eldest = 24 > 21 ? "Liz" : "Ike";