mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
27 lines
416 B
CoffeeScript
27 lines
416 B
CoffeeScript
gold = silver = rest = "unknown"
|
|
|
|
awardMedals = (first, second, others...) ->
|
|
gold = first
|
|
silver = second
|
|
rest = others
|
|
|
|
contenders = [
|
|
"Michael Phelps"
|
|
"Liu Xiang"
|
|
"Yao Ming"
|
|
"Allyson Felix"
|
|
"Shawn Johnson"
|
|
"Roman Sebrle"
|
|
"Guo Jingjing"
|
|
"Tyson Gay"
|
|
"Asafa Powell"
|
|
"Usain Bolt"
|
|
]
|
|
|
|
awardMedals contenders...
|
|
|
|
alert "Gold: " + gold
|
|
alert "Silver: " + silver
|
|
alert "The Field: " + rest
|
|
|
|
|