Skip to content

Instantly share code, notes, and snippets.

@mkoryak
Created July 17, 2013 19:55
Show Gist options
  • Save mkoryak/6023894 to your computer and use it in GitHub Desktop.
Save mkoryak/6023894 to your computer and use it in GitHub Desktop.
functional
var Person = function(){
var that = {};
var privateVar = 'BLEEEEEE'; //how do i do this with prototypical inhereitance?
that.talk = function(){
return "i said "+privateVar;
}
return that;
};
var Me = function(){
var that = Person(); //or i can set it to the prototype of that...
that.talk = function(){
return "BLEEEEEEEEEEE!"
};
return that;
};
var person = Person();
var me = Me();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment