PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/documentation/coffee/splats.coffee

http://github.com/jashkenas/coffee-script
CoffeeScript | 25 lines | 21 code | 4 blank | 0 comment | 0 complexity | 32a81415b7c5c962b86471d0a711b0d6 MD5 | raw file
 1gold = silver = rest = "unknown"
 2
 3awardMedals = (first, second, others...) ->
 4  gold   = first
 5  silver = second
 6  rest   = others
 7
 8contenders = [
 9  "Michael Phelps"
10  "Liu Xiang"
11  "Yao Ming"
12  "Allyson Felix"
13  "Shawn Johnson"
14  "Roman Sebrle"
15  "Guo Jingjing"
16  "Tyson Gay"
17  "Asafa Powell"
18  "Usain Bolt"
19]
20
21awardMedals contenders...
22
23alert "Gold: " + gold
24alert "Silver: " + silver
25alert "The Field: " + rest