mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-18 03:21:20 -05:00
24 lines
469 B
CoffeeScript
24 lines
469 B
CoffeeScript
Base: =>
|
|
Base.prototype.func: string =>
|
|
'zero/' + string
|
|
|
|
FirstChild: =>
|
|
FirstChild extends Base
|
|
FirstChild.prototype.func: string =>
|
|
super('one/') + string
|
|
|
|
SecondChild: =>
|
|
SecondChild extends FirstChild
|
|
SecondChild.prototype.func: string =>
|
|
super('two/') + string
|
|
|
|
ThirdChild: =>
|
|
ThirdChild extends SecondChild
|
|
ThirdChild.prototype.func: string =>
|
|
super('three/') + string
|
|
|
|
result: (new ThirdChild()).func('four')
|
|
|
|
print(result is 'zero/one/two/three/four')
|
|
|