(function () {
var lyrics = [];
['badger', 'mushroom', 'snake'].forEach(function(word) {
window[word] = function(){ lyrics.push(word); };
});
function repeat(f, n) {
for (var i=0; i <= n; ++i) {
f();
}
}
repeat(function(){
repeat(badger,11);
repeat(mushroom,2);
}, 3);
repeat(badger,11);
repeat(snake,4);
alert(lyrics.join());
})();
I'm sure you remember the song.
16.12.08
This is why I don't get any work done
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment