presentations/highlight-js/test/detect/coffeescript/default.txt

14 lines
288 B
Text
Raw Normal View History

2018-12-07 08:48:05 -06:00
grade = (student, period=(if b? then 7 else 6)) ->
if student.excellentWork
"A+"
else if student.okayStuff
if student.triedHard then "B" else "B-"
else
"C"
class Animal extends Being
constructor: (@name) ->
move: (meters) ->
alert @name + " moved #{meters}m."