Created
April 21, 2015 20:11
-
-
Save nooga/1d4844db9b3a2677f9cf to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Headout = { | |
apply: function() { | |
return true; | |
}, | |
code: function() { | |
console.log("I", this.a.join(' '), 'code at Headout'); | |
this.a = []; | |
return this; | |
}, | |
a: [] | |
}; | |
"eat sleep drink".split(" ").forEach(function(s){ | |
Headout[s] = function() { | |
this.a.push(s); | |
return this; | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment