Skip to content

Instantly share code, notes, and snippets.

@markstickley
Created October 19, 2010 10:22
Show Gist options
  • Save markstickley/633972 to your computer and use it in GitHub Desktop.
Save markstickley/633972 to your computer and use it in GitHub Desktop.
Is this even possible?
var object = function(){
var foo = 'bar';
var woo = 'yay';
var r = {};
r.getVar = function(name){
// ???
};
return r;
}();
object.getVar('foo'); // should return 'bar'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment