1
0
Fork 0
mirror of https://github.com/jashkenas/coffeescript.git synced 2022-11-09 12:23:24 -05:00
jashkenas--coffeescript/documentation/js/expressions.js

11 lines
239 B
JavaScript
Raw Normal View History

2010-07-29 00:51:35 -04:00
var eldest, grade;
grade = function(student) {
if (student.excellentWork) {
return "A+";
} else if (student.okayStuff) {
return student.triedHard ? "B" : "B-";
} else {
return "C";
}
};
eldest = 24 > 21 ? "Liz" : "Ike";