Skip to content

Instantly share code, notes, and snippets.

@nooga
Created April 21, 2015 20:11
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nooga/1d4844db9b3a2677f9cf to your computer and use it in GitHub Desktop.
Save nooga/1d4844db9b3a2677f9cf to your computer and use it in GitHub Desktop.
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