mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
18 lines
319 B
JavaScript
18 lines
319 B
JavaScript
// Generated by CoffeeScript 1.7.1
|
|
var eldest, grade;
|
|
|
|
grade = function(student) {
|
|
if (student.excellentWork) {
|
|
return "A+";
|
|
} else if (student.okayStuff) {
|
|
if (student.triedHard) {
|
|
return "B";
|
|
} else {
|
|
return "B-";
|
|
}
|
|
} else {
|
|
return "C";
|
|
}
|
|
};
|
|
|
|
eldest = 24 > 21 ? "Liz" : "Ike";
|