jashkenas--coffeescript/documentation/coffee/splats.coffee

25 lines
421 B
CoffeeScript
Raw Normal View History

2010-01-04 23:26:27 -05:00
gold: silver: the_field: "unknown"
2010-01-05 21:40:36 -05:00
medalists: first, second, rest... =>
2010-01-04 23:26:27 -05:00
gold: first
silver: second
the_field: rest
contenders: [
"Michael Phelps"
"Liu Xiang"
"Yao Ming"
"Allyson Felix"
"Shawn Johnson"
"Roman Sebrle"
"Guo Jingjing"
"Tyson Gay"
"Asafa Powell"
"Usain Bolt"
]
2010-01-05 21:40:36 -05:00
medalists(contenders...)
2010-01-04 23:26:27 -05:00
alert("Gold: " + gold)
alert("Silver: " + silver)
alert("The Field: " + the_field)