mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-05-03 03:00:14 -04:00
* Update classes docs for CS2 * Port breaking changes from https://github.com/jashkenas/coffeescript/wiki/%5BWIP%5D-Breaking-changes-in-CoffeeScript-2 into new docs section * Update browser compiler * Update re @connec’s notes; split classes section into two sections for classes and working with prototypes; make breaking changes examples editable whenever possible
361 B
361 B
Prototypal Inheritance
In addition to supporting ES2015 classes, CoffeeScript provides a few shortcuts for working with prototypes. The extends operator can be used to create an inheritance chain between any pair of constructor functions, and :: gives you quick access to an object’s prototype:
codeFor('prototypes', '"one_two".dasherize()')