mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
cc3be717a0
* The generated JavaScript for the examples in the docs ends up within index.html, so we don’t need the intermediate generated .js files committed in the repo; also, even while .gitignored they should be under `docs`, with the rest of the generated files, not under `documentation`, where the source files are. * Add “Existential Operator” to the table of contents. Closes #4361 * Updated output due to newer version of highlight.js * Generated the JavaScript for the docs examples should be synchronous, so that index.html isn’t generated before the JavaScript is * In “Try CoffeeScript,” if you press the tab key it should type a tab character. Closes #3342. * Rename doc example folders from `js` and `coffee` to just `examples` * Add missing `yield` to the list of keywords to highlight until highlight.js catches up; update the class used to match highlight.js’ `keyword` * `cake doc:site` should watch the example files too, not just index.html.js * Remove examples folder, including underscore.coffee; remove link to annotated underscore.coffee
25 lines
414 B
CoffeeScript
25 lines
414 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
|