2010-01-05 04:26:27 +00:00
|
|
|
(function(){
|
2010-01-27 04:23:59 +00:00
|
|
|
var award_medals, contenders, gold, silver, the_field;
|
2010-01-17 23:12:59 +00:00
|
|
|
gold = (silver = (the_field = "unknown"));
|
2010-01-27 04:23:59 +00:00
|
|
|
award_medals = function award_medals(first, second) {
|
2010-01-05 04:26:27 +00:00
|
|
|
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"];
|
2010-01-27 04:23:59 +00:00
|
|
|
award_medals.apply(this, contenders);
|
2010-01-05 04:26:27 +00:00
|
|
|
alert("Gold: " + gold);
|
|
|
|
alert("Silver: " + silver);
|
|
|
|
alert("The Field: " + the_field);
|
2010-02-24 23:27:10 +00:00
|
|
|
})();
|