mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
more docs for 0.2 -- blocks and splats
This commit is contained in:
parent
ae603749be
commit
0cf7801f36
6 changed files with 182 additions and 14 deletions
8
documentation/js/blocks.js
Normal file
8
documentation/js/blocks.js
Normal file
|
@ -0,0 +1,8 @@
|
|||
(function(){
|
||||
$('table.list').each(function(table) {
|
||||
return $('tr.account', table).each(function(row) {
|
||||
row.show();
|
||||
return row.highlight();
|
||||
});
|
||||
});
|
||||
})();
|
16
documentation/js/splats.js
Normal file
16
documentation/js/splats.js
Normal file
|
@ -0,0 +1,16 @@
|
|||
(function(){
|
||||
var contenders, gold, medalists, silver, the_field;
|
||||
gold = silver = the_field = "unknown";
|
||||
medalists = function medalists(first, second) {
|
||||
var rest;
|
||||
rest = Array.prototype.slice.call(arguments, 2);
|
||||
gold = first;
|
||||
silver = second;
|
||||
return the_field = rest;
|
||||
};
|
||||
contenders = ["Michael Phelps", "Liu Xiang", "Yao Ming", "Allyson Felix", "Shawn Johnson", "Roman Sebrle", "Guo Jingjing", "Tyson Gay", "Asafa Powell", "Usain Bolt"];
|
||||
medalists.apply(this, contenders);
|
||||
alert("Gold: " + gold);
|
||||
alert("Silver: " + silver);
|
||||
alert("The Field: " + the_field);
|
||||
})();
|
Loading…
Add table
Add a link
Reference in a new issue