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

6 lines
128 B
CoffeeScript
Raw Normal View History

class Person
2015-08-29 13:18:44 -04:00
constructor: (options) ->
{@name, @age, @height = 'average'} = options
2015-08-29 13:18:44 -04:00
tim = new Person name: 'Tim', age: 4