PageRenderTime 14ms CodeModel.GetById 11ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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